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

[ADDED] UpdateKeyValue and CreateOrUpdateKeyValue methods #1549

Merged
merged 2 commits into from Feb 8, 2024

Conversation

piotrpio
Copy link
Collaborator

@piotrpio piotrpio commented Feb 7, 2024

  • Added CreateOrUpdateKeyValue and UpdateKeyValue methods to jetstream.KeyValueManager
  • Improved errors returned by KV CRUD methods. To preserve backwards compatibility when using errors.Is(), jetstream and KV errors are joined so that e.g. both errors.Is(err, ErrBucketExists) and errors.Is(err, ErrStreamNameAlreadyInUse) return true when attempting to overwrite a bucket with CreateKeyValue

Signed-off-by: Piotr Piotrowski piotr@synadia.com

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio requested a review from Jarema February 7, 2024 21:24
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

jetstream/kv.go Outdated Show resolved Hide resolved
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio merged commit 547cafa into main Feb 8, 2024
2 checks passed
@piotrpio piotrpio deleted the add-update-to-kv branch February 8, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants