Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVE] Mention TTL in the Update function #1727

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading