Method HistoryAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
HistoryAsync<T>(string, INatsDeserialize<T>?, NatsKVWatchOpts?, CancellationToken)
Get the history of an entry by key
IAsyncEnumerable<NatsKVEntry<T>> HistoryAsync<T>(string key, INatsDeserialize<T>? serializer = null, NatsKVWatchOpts? opts = null, CancellationToken cancellationToken = default)Parameters
- keystring
- Key of the entry 
- serializerINatsDeserialize<T>
- Serializer to use for the message type. 
- optsNatsKVWatchOpts
- Watch options 
- cancellationTokenCancellationToken
- A CancellationToken used to cancel the API call. 
Returns
- IAsyncEnumerable<NatsKVEntry<T>>
- An async enumerable of entries to be used in an - await foreach
Type Parameters
- T
- Serialized value type 
Exceptions
- InvalidOperationException
- There was a conflict in options, e.g. IncludeHistory and UpdatesOnly are only valid when ResumeAtRevision is not set.