Skip to content

Commit

Permalink
Mention TTL in the Update function
Browse files Browse the repository at this point in the history
  • Loading branch information
fmontorsi-equinix committed Oct 17, 2024
1 parent c7cf345 commit 4e3c53a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions jetstream/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ type (

// Update will update the value if the latest revision matches.
// If the provided revision is not the latest, Update will return an error.
// Update also resets the TTL associated with the key (if any).
Update(ctx context.Context, key string, value []byte, revision uint64) (uint64, error)

// Delete will place a delete marker and leave all revisions. A history
Expand Down
1 change: 1 addition & 0 deletions kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type KeyValue interface {
// Create will add the key/value pair iff it does not exist.
Create(key string, value []byte) (revision uint64, err error)
// Update will update the value iff the latest revision matches.
// Update also resets the TTL associated with the key (if any).
Update(key string, value []byte, last uint64) (revision uint64, err error)
// Delete will place a delete marker and leave all revisions.
Delete(key string, opts ...DeleteOpt) error
Expand Down

0 comments on commit 4e3c53a

Please sign in to comment.