Table of Contents

Method GetKeysAsync

Namespace
NATS.Client.KeyValueStore
Assembly
NATS.Client.KeyValueStore.dll

GetKeysAsync(NatsKVWatchOpts?, CancellationToken)

Get all the keys in the bucket

IAsyncEnumerable<string> GetKeysAsync(NatsKVWatchOpts? opts = null, CancellationToken cancellationToken = default)

Parameters

opts NatsKVWatchOpts

Watch options

cancellationToken CancellationToken

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

IAsyncEnumerable<string> GetKeysAsync(IEnumerable<string> filters, NatsKVWatchOpts? opts = null, CancellationToken cancellationToken = default)

Parameters

filters IEnumerable<string>

Subject-based wildcard filters to filter on

opts NatsKVWatchOpts

Watch options

cancellationToken CancellationToken

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.