Method GetKeysAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
GetKeysAsync(NatsKVWatchOpts?, CancellationToken)
Get all the keys in the bucket
public IAsyncEnumerable<string> GetKeysAsync(NatsKVWatchOpts? opts = null, CancellationToken cancellationToken = default)Parameters
- optsNatsKVWatchOpts
- Watch options 
- cancellationTokenCancellationToken
- A CancellationToken used to cancel the API call. 
Returns
- IAsyncEnumerable<string>
- An async enumerable of keys to be used in an - await foreach
Exceptions
- InvalidOperationException
- There was a conflict in options, e.g. IncludeHistory and UpdatesOnly are only valid when ResumeAtRevision is not set. 
GetKeysAsync(IEnumerable<string>, NatsKVWatchOpts?, CancellationToken)
Get a filtered set of keys in the bucket
public IAsyncEnumerable<string> GetKeysAsync(IEnumerable<string> filters, NatsKVWatchOpts? opts = null, CancellationToken cancellationToken = default)Parameters
- filtersIEnumerable<string>
- Subject-based wildcard filters to filter on 
- optsNatsKVWatchOpts
- Watch options 
- cancellationTokenCancellationToken
- A CancellationToken used to cancel the API call. 
Returns
- IAsyncEnumerable<string>
- An async enumerable of keys to be used in an - await foreach
Exceptions
- InvalidOperationException
- There was a conflict in options, e.g. IncludeHistory and UpdatesOnly are only valid when ResumeAtRevision is not set.