Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface KvOptions
implements KvLimits
import { type KvOptions } from "https://deno.land/x/natsws@v1.29.2/src/mod.ts";

Properties

timeout: number

How long to wait in milliseconds for a response from the KV

streamName: string

The underlying stream name for the KV

codec: KvCodecs

An encoder/decoder for keys and values

bindOnly: boolean

Doesn't attempt to create the KV stream if it doesn't exist.

allow_direct: boolean

If true and on a recent server, changes the way the KV retrieves values. This option is significantly faster, but has the possibility of inconsistency during a read.

optional
metadata: Record<string, string>

Metadata field to store additional information about the kv. Note that keys starting with _nats are reserved. This feature only supported on servers 2.10.x and better.