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

Method WatchKey

kv/multi.go:324–329  ·  view source on GitHub ↗

WatchKey is a part of kv.Client interface.

(ctx context.Context, key string, f func(interface{}) bool)

Source from the content-addressed store, hash-verified

322
323// WatchKey is a part of kv.Client interface.
324func (m *MultiClient) WatchKey(ctx context.Context, key string, f func(interface{}) bool) {
325 _ = m.runWithPrimaryClient(ctx, func(newCtx context.Context, primary kvclient) error {
326 primary.client.WatchKey(newCtx, key, f)
327 return newCtx.Err()
328 })
329}
330
331// WatchPrefix is a part of kv.Client interface.
332func (m *MultiClient) WatchPrefix(ctx context.Context, prefix string, f func(string, interface{}) bool) {

Callers

nothing calls this directly

Calls 3

runWithPrimaryClientMethod · 0.95
WatchKeyMethod · 0.65
ErrMethod · 0.45

Tested by

no test coverage detected