GetRevision returns a specific revision value for the key.
(key string, revision uint64)
| 605 | |
| 606 | // GetRevision returns a specific revision value for the key. |
| 607 | func (kv *kvs) GetRevision(key string, revision uint64) (KeyValueEntry, error) { |
| 608 | e, err := kv.get(key, revision) |
| 609 | if err != nil { |
| 610 | if errors.Is(err, ErrKeyDeleted) { |
| 611 | return nil, ErrKeyNotFound |
| 612 | } |
| 613 | return nil, err |
| 614 | } |
| 615 | |
| 616 | return e, nil |
| 617 | } |
| 618 | |
| 619 | func (kv *kvs) get(key string, revision uint64) (KeyValueEntry, error) { |
| 620 | if !keyValid(key) { |