Skip to content

Commit

Permalink
Add GetRevision()
Browse files Browse the repository at this point in the history
GetRevision returns a specific revision value for the key, or "KeyNotFound" if that message for this revision can't be found. See nats-io/nats.go#903

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
  • Loading branch information
kozlovic committed Feb 11, 2022
1 parent 7cfc439 commit a632aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adr/ADR-8.md
Expand Up @@ -143,7 +143,7 @@ The interface here is a guide of what should function in read-only mode.
type RoKV interface {
// Get gets a key from the store
Get(key string) (Entry, error)

// History retrieves historic values for a key
History(ctx context.Context, key string) ([]Entry, error)

Expand Down Expand Up @@ -350,7 +350,7 @@ The default behavior with no options set is to send all the `last_per_subject` v

#### API Design notes

The API here represents a minimum, languages can add local flavour to the API - for example one can add `PutUint64()` and `GetUint64()`
The API here represents a minimum, languages can add local flavour to the API - for example one can add `PutUint64()` and `GetUint64()`, or `GetRevision()` that would return a specific revision value for the key,
in addition to the `Get()` and `Put()` defined here, but it's important that as far as possible all implementations strive to match
the core API calls - `Get()`, `Put()` and to a lesser extent `Delete()` and `Purge()` and `Entry` - the rest, admin APIs, and supporting
calls can be adjusted to be a natural fit in the language and design. This is in line with existing efforts to harmonize
Expand Down

0 comments on commit a632aa1

Please sign in to comment.