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

Method isMatch

kv/etcd/mock.go:377–380  ·  view source on GitHub ↗

isMatch returns true if the provided key-value pair matches the given Op

(op clientv3.Op, kvp mvccpb.KeyValue)

Source from the content-addressed store, hash-verified

375
376// isMatch returns true if the provided key-value pair matches the given Op
377func (m *mockKV) isMatch(op clientv3.Op, kvp mvccpb.KeyValue) bool {
378 keys := m.matchingKeys(op, map[string]mvccpb.KeyValue{string(kvp.Key): kvp})
379 return len(keys) != 0
380}
381
382// evalCmps executes the given comparisons, stopping as soon as the first one
383// evaluates to false.

Callers 1

WatchMethod · 0.95

Calls 1

matchingKeysMethod · 0.95

Tested by

no test coverage detected