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

Method Put

kv/etcd/mock.go:203–212  ·  view source on GitHub ↗

Put implements the Clientv3Facade interface

(ctx context.Context, key, val string, opts ...clientv3.OpOption)

Source from the content-addressed store, hash-verified

201
202// Put implements the Clientv3Facade interface
203func (m *mockKV) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) {
204 op := clientv3.OpPut(key, val, opts...)
205 res, err := m.Do(ctx, op)
206
207 if err != nil {
208 return nil, err
209 }
210
211 return res.Put(), nil
212}
213
214// Txn implements the Clientv3Facade interface
215func (m *mockKV) Txn(ctx context.Context) clientv3.Txn {

Callers

nothing calls this directly

Calls 2

DoMethod · 0.95
PutMethod · 0.65

Tested by

no test coverage detected