MCPcopy
hub / github.com/grafana/dskit / mockKV

Struct mockKV

kv/consul/mock.go:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19const maxWaitTime = 100 * time.Millisecond
20
21type mockKV struct {
22 mtx sync.Mutex
23 cond *sync.Cond
24 kvps map[string]*consul.KVPair
25 current uint64 // the current 'index in the log'
26 logger log.Logger
27
28 // Channel closed once the in-memory consul mock should be closed.
29 close chan struct{}
30 closeWG sync.WaitGroup
31}
32
33// NewInMemoryClient makes a new mock consul client.
34func NewInMemoryClient(codec codec.Codec, logger log.Logger, registerer prometheus.Registerer) (*Client, io.Closer) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected