GetRevision returns a specific revision value for the key.
(ctx context.Context, key string, revision uint64)
| 1015 | |
| 1016 | // GetRevision returns a specific revision value for the key. |
| 1017 | func (kv *kvs) GetRevision(ctx context.Context, key string, revision uint64) (KeyValueEntry, error) { |
| 1018 | e, err := kv.get(ctx, key, revision) |
| 1019 | if err != nil { |
| 1020 | if errors.Is(err, ErrKeyDeleted) { |
| 1021 | return nil, ErrKeyNotFound |
| 1022 | } |
| 1023 | return nil, err |
| 1024 | } |
| 1025 | |
| 1026 | return e, nil |
| 1027 | } |
| 1028 | |
| 1029 | // Put will place the new value for the key into the store. |
| 1030 | func (kv *kvs) Put(ctx context.Context, key string, value []byte) (uint64, error) { |