Table of Contents

Method TryPurgeAsync

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

TryPurgeAsync(string, NatsKVDeleteOpts?, CancellationToken)

Tries to purge an entry from the bucket

public ValueTask<NatsResult> TryPurgeAsync(string key, NatsKVDeleteOpts? opts = null, CancellationToken cancellationToken = default)

Parameters

key string

Key of the entry

opts NatsKVDeleteOpts

Delete options

cancellationToken CancellationToken

A 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