dataCache contains a cache of RLS data used by the LB policy to make routing decisions. The dataCache will be keyed by the request's path and keys, represented by the `cacheKey` type. It will maintain the cache keys in an `lru` and the cache data, represented by the `cacheEntry` type, in a native m
| 164 | // |
| 165 | // It is not safe for concurrent access. |
| 166 | type dataCache struct { |
| 167 | maxSize int64 // Maximum allowed size. |
| 168 | currentSize int64 // Current size. |
| 169 | keys *lru // Cache keys maintained in lru order. |
| 170 | entries map[cacheKey]*cacheEntry |
| 171 | logger *internalgrpclog.PrefixLogger |
| 172 | shutdown *grpcsync.Event |
| 173 | rlsServerTarget string |
| 174 | |
| 175 | // Read only after initialization. |
| 176 | grpcTarget string |
| 177 | uuid string |
| 178 | } |
| 179 | |
| 180 | func newDataCache(size int64, logger *internalgrpclog.PrefixLogger, grpcTarget string) *dataCache { |
| 181 | return &dataCache{ |
nothing calls this directly
no outgoing calls
no test coverage detected