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

Ensure full coverage of KV management methods #284

Open
1 of 13 tasks
Jarema opened this issue Jun 7, 2024 · 1 comment
Open
1 of 13 tasks

Ensure full coverage of KV management methods #284

Jarema opened this issue Jun 7, 2024 · 1 comment
Labels
client Client related work enhancement New feature or request

Comments

@Jarema
Copy link
Member

Jarema commented Jun 7, 2024

Overview

The KV ADR has been updated here: #283

Please make sure that your client covers all the methods mentioned in the change:

// KeyValueManager is used to manage KeyValue buckets. It provides methods to
// create, delete, and retrieve.
type KeyValueManager interface {
    // KeyValue will lookup and bind to an existing KeyValue bucket.
    // Name can be `get_key_value`, or whatever name is idiomatic in given language.
    KeyValue(ctx context.Context, bucket string) (KeyValue, error)

    // CreateKeyValue will create a KeyValue bucket with the given
    // configuration.
    CreateKeyValue(ctx context.Context, cfg KeyValueConfig) (KeyValue, error)

    // UpdateKeyValue will update an existing KeyValue bucket with the given
    // configuration.
    UpdateKeyValue(ctx context.Context, cfg KeyValueConfig) (KeyValue, error)

    // CreateOrUpdateKeyValue will create a KeyValue bucket if it does not
    // exist or update an existing KeyValue bucket with the given
    // configuration (if possible).
    CreateOrUpdateKeyValue(ctx context.Context, cfg KeyValueConfig) (KeyValue, error)

    // DeleteKeyValue will delete given KeyValue bucket.
    DeleteKeyValue(ctx context.Context, bucket string) error

    // KeyValueBucketNames is used to retrieve a list of key value bucket
    // names.
    KeyValueBuckerNames(ctx context.Context) KeyValueNamesLister

    // KeyValueBuckets is used to retrieve a list of key value bucket
    // statuses.
    KeyValueBuckets(ctx context.Context) KeyValueLister
}

Keep the names idiomatic for your language.

Clients and Tools

Other Tasks

  • docs.nats.io updated @bruth
  • Update ADR to Implemented
  • Update client features spreadsheet

Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.

@mtmk
Copy link
Contributor

mtmk commented Jul 2, 2024

Note that we're not implementing CreateOrUpdateKeyValue for .NET since there is no equivalent JetStream API for managing streams. We can implement it after an atomic create-or-update-stream function is implemented server side.

edit naming seems to be confusing btw makes you think updating the value of a 'key'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client related work enhancement New feature or request
Projects
None yet
Development

No branches or pull requests