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

Method List

kv/consul/metrics.go:56–66  ·  view source on GitHub ↗
(path string, options *consul.QueryOptions)

Source from the content-addressed store, hash-verified

54}
55
56func (c consulInstrumentation) List(path string, options *consul.QueryOptions) (consul.KVPairs, *consul.QueryMeta, error) {
57 var kvps consul.KVPairs
58 var meta *consul.QueryMeta
59 err := instrument.CollectedRequest(options.Context(), "List", c.consulMetrics.consulRequestDuration, instrument.ErrorCode, func(ctx context.Context) error {
60 options = options.WithContext(ctx)
61 var err error
62 kvps, meta, err = c.kv.List(path, options)
63 return err
64 })
65 return kvps, meta, err
66}
67
68func (c consulInstrumentation) Delete(key string, options *consul.WriteOptions) (*consul.WriteMeta, error) {
69 var meta *consul.WriteMeta

Callers

nothing calls this directly

Calls 3

CollectedRequestFunction · 0.92
ListMethod · 0.65
ContextMethod · 0.45

Tested by

no test coverage detected