MCPcopy
hub / github.com/grpc/grpc-go / newDataCache

Function newDataCache

balancer/rls/cache.go:180–190  ·  view source on GitHub ↗
(size int64, logger *internalgrpclog.PrefixLogger, grpcTarget string)

Source from the content-addressed store, hash-verified

178}
179
180func newDataCache(size int64, logger *internalgrpclog.PrefixLogger, grpcTarget string) *dataCache {
181 return &dataCache{
182 maxSize: size,
183 keys: newLRU(),
184 entries: make(map[cacheKey]*cacheEntry),
185 logger: logger,
186 shutdown: grpcsync.NewEvent(),
187 grpcTarget: grpcTarget,
188 uuid: uuid.New().String(),
189 }
190}
191
192// updateRLSServerTarget updates the RLS Server Target the RLS Balancer is
193// configured with.

Calls 3

NewEventFunction · 0.92
newLRUFunction · 0.85
StringMethod · 0.65