Method GetEntryAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
GetEntryAsync<T>(string, ulong, INatsDeserialize<T>?, CancellationToken)
Get an entry from the bucket using the key
public ValueTask<NatsKVEntry<T>> GetEntryAsync<T>(string key, ulong revision = 0, INatsDeserialize<T>? serializer = null, CancellationToken cancellationToken = default)
Parameters
key
stringKey of the entry
revision
ulongRevision to retrieve
serializer
INatsDeserialize<T>Optional serialized to override the default
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<NatsKVEntry<T>>
The entry
Type Parameters
T
Serialized value type
Exceptions
- NatsKVException
There was an error with metadata