Method TryDeleteAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
TryDeleteAsync(string, NatsKVDeleteOpts?, CancellationToken)
Delete an entry from the bucket
ValueTask<NatsResult> TryDeleteAsync(string key, NatsKVDeleteOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
key
stringKey of the entry
opts
NatsKVDeleteOptsDelete options
cancellationToken
CancellationTokenA CancellationToken used to cancel the API call.
Returns
- ValueTask<NatsResult>
A NatsResult object representing success or an error.
Remarks
Use this method to avoid exceptions