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

Method WatchKey

kv/metrics.go:102–107  ·  view source on GitHub ↗
(ctx context.Context, key string, f func(interface{}) bool)

Source from the content-addressed store, hash-verified

100}
101
102func (m metrics) WatchKey(ctx context.Context, key string, f func(interface{}) bool) {
103 _ = instrument.CollectedRequest(ctx, "WatchKey", m.requestDuration, instrument.ErrorCode, func(ctx context.Context) error {
104 m.c.WatchKey(ctx, key, f)
105 return nil
106 })
107}
108
109func (m metrics) WatchPrefix(ctx context.Context, prefix string, f func(string, interface{}) bool) {
110 _ = instrument.CollectedRequest(ctx, "WatchPrefix", m.requestDuration, instrument.ErrorCode, func(ctx context.Context) error {

Callers

nothing calls this directly

Calls 2

CollectedRequestFunction · 0.92
WatchKeyMethod · 0.65

Tested by

no test coverage detected