(op clientv3.Op)
| 232 | } |
| 233 | |
| 234 | func (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 | |
| 250 | func (m *mockKV) doGet(op clientv3.Op) (clientv3.OpResponse, error) { |
| 251 | matching := m.matchingKeys(op, m.values) |