Get returns the latest value for the key.
(key string)
| 592 | |
| 593 | // Get returns the latest value for the key. |
| 594 | func (kv *kvs) Get(key string) (KeyValueEntry, error) { |
| 595 | e, err := kv.get(key, kvLatestRevision) |
| 596 | if err != nil { |
| 597 | if errors.Is(err, ErrKeyDeleted) { |
| 598 | return nil, ErrKeyNotFound |
| 599 | } |
| 600 | return nil, err |
| 601 | } |
| 602 | |
| 603 | return e, nil |
| 604 | } |
| 605 | |
| 606 | // GetRevision returns a specific revision value for the key. |
| 607 | func (kv *kvs) GetRevision(key string, revision uint64) (KeyValueEntry, error) { |