MCPcopy Create free account
hub / github.com/cortexproject/cortex / WatchKey

Method WatchKey

pkg/ring/kv/multi.go:323–328  ·  view source on GitHub ↗

WatchKey is a part of kv.Client interface.

(ctx context.Context, key string, f func(any) bool)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

runWithPrimaryClientMethod · 0.95
WatchKeyMethod · 0.65
ErrMethod · 0.65

Tested by

no test coverage detected