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

Method Get

kv/etcd/mock.go:179–188  ·  view source on GitHub ↗

Get implements the Clientv3Facade interface

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

Source from the content-addressed store, hash-verified

177
178// Get implements the Clientv3Facade interface
179func (m *mockKV) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) {
180 op := clientv3.OpGet(key, opts...)
181 res, err := m.Do(ctx, op)
182
183 if err != nil {
184 return nil, err
185 }
186
187 return res.Get(), nil
188}
189
190// Delete implements the Clientv3Facade interface
191func (m *mockKV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) {

Callers

nothing calls this directly

Calls 2

DoMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected