Get implements the Clientv3Facade interface
(ctx context.Context, key string, opts ...clientv3.OpOption)
| 177 | |
| 178 | // Get implements the Clientv3Facade interface |
| 179 | func (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 |
| 191 | func (m *mockKV) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) { |