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

Method Put

kv/consul/metrics.go:79–88  ·  view source on GitHub ↗
(p *consul.KVPair, options *consul.WriteOptions)

Source from the content-addressed store, hash-verified

77}
78
79func (c consulInstrumentation) Put(p *consul.KVPair, options *consul.WriteOptions) (*consul.WriteMeta, error) {
80 var result *consul.WriteMeta
81 err := instrument.CollectedRequest(options.Context(), "Put", c.consulMetrics.consulRequestDuration, instrument.ErrorCode, func(ctx context.Context) error {
82 options = options.WithContext(ctx)
83 var err error
84 result, err = c.kv.Put(p, options)
85 return err
86 })
87 return result, err
88}

Callers

nothing calls this directly

Calls 3

CollectedRequestFunction · 0.92
PutMethod · 0.65
ContextMethod · 0.45

Tested by

no test coverage detected