Method CreateStoreAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
CreateStoreAsync(string, CancellationToken)
Create a new Key Value Store or get an existing one
public ValueTask<INatsKVStore> CreateStoreAsync(string bucket, CancellationToken cancellationToken = default)Parameters
- bucketstring
- Name of the bucket 
- cancellationTokenCancellationToken
- A CancellationToken used to cancel the API call. 
Returns
- ValueTask<INatsKVStore>
- Key Value Store 
Exceptions
- NatsJSException
- There was an issue retrieving the response. 
- NatsJSApiException
- Server responded with an error. 
CreateStoreAsync(NatsKVConfig, CancellationToken)
Create a new Key Value Store or get an existing one
public ValueTask<INatsKVStore> CreateStoreAsync(NatsKVConfig config, CancellationToken cancellationToken = default)Parameters
- configNatsKVConfig
- Key Value Store configuration 
- cancellationTokenCancellationToken
- A CancellationToken used to cancel the API call. 
Returns
- ValueTask<INatsKVStore>
- Key Value Store 
Exceptions
- NatsKVException
- There was an issue with configuration 
- NatsJSException
- There was an issue retrieving the response. 
- NatsJSApiException
- Server responded with an error.