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

Method doInternal

kv/etcd/mock.go:234–248  ·  view source on GitHub ↗
(op clientv3.Op)

Source from the content-addressed store, hash-verified

232}
233
234func (m *mockKV) doInternal(op clientv3.Op) (clientv3.OpResponse, error) {
235 if op.IsGet() {
236 return m.doGet(op)
237 }
238 if op.IsPut() {
239 return m.doPut(op)
240 }
241 if op.IsDelete() {
242 return m.doDelete(op)
243 }
244 if op.IsTxn() {
245 return m.doTxn(op)
246 }
247 panic(fmt.Sprintf("unsupported operation: %+v", op))
248}
249
250func (m *mockKV) doGet(op clientv3.Op) (clientv3.OpResponse, error) {
251 matching := m.matchingKeys(op, m.values)

Callers 2

DoMethod · 0.95
doTxnMethod · 0.95

Calls 4

doGetMethod · 0.95
doPutMethod · 0.95
doDeleteMethod · 0.95
doTxnMethod · 0.95

Tested by

no test coverage detected