MCPcopy Index your code
hub / github.com/go-kit/kit / newEndpointCache

Function newEndpointCache

sd/endpoint_cache.go:34–42  ·  view source on GitHub ↗

newEndpointCache returns a new, empty endpointCache.

(factory Factory, logger log.Logger, options endpointerOptions)

Source from the content-addressed store, hash-verified

32
33// newEndpointCache returns a new, empty endpointCache.
34func newEndpointCache(factory Factory, logger log.Logger, options endpointerOptions) *endpointCache {
35 return &endpointCache{
36 options: options,
37 factory: factory,
38 cache: map[string]endpointCloser{},
39 logger: logger,
40 timeNow: time.Now,
41 }
42}
43
44// Update should be invoked by clients with a complete set of current instance
45// strings whenever that set changes. The cache manufactures new endpoints via

Callers 5

TestEndpointCacheFunction · 0.85
TestBadFactoryFunction · 0.85
BenchmarkEndpointsFunction · 0.85
NewEndpointerFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestEndpointCacheFunction · 0.68
TestBadFactoryFunction · 0.68
BenchmarkEndpointsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…