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

Method WatchPrefix

pkg/ring/kv/multi.go:331–336  ·  view source on GitHub ↗

WatchPrefix is a part of kv.Client interface.

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

Source from the content-addressed store, hash-verified

329
330// WatchPrefix is a part of kv.Client interface.
331func (m *MultiClient) WatchPrefix(ctx context.Context, prefix string, f func(string, any) bool) {
332 _ = m.runWithPrimaryClient(ctx, func(newCtx context.Context, primary kvclient) error {
333 primary.client.WatchPrefix(newCtx, prefix, f)
334 return newCtx.Err()
335 })
336}
337
338func (m *MultiClient) LastUpdateTime(key string) time.Time {
339 _, kv := m.getPrimaryClient()

Callers

nothing calls this directly

Calls 3

runWithPrimaryClientMethod · 0.95
WatchPrefixMethod · 0.65
ErrMethod · 0.65

Tested by

no test coverage detected