@nats-io/kv
    Preparing search index...

    Type Alias KvOptions

    KvOptions: KvLimits & {
        allow_direct: boolean;
        bindOnly: boolean;
        codec: KvCodecs;
        metadata?: Record<string, string>;
        streamName: string;
        timeout: number;
    }

    Type declaration

    • 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.

    • bindOnly: boolean

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

    • codec: KvCodecs

      An encoder/decoder for keys and values

    • Optionalmetadata?: 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.

    • streamName: string

      The underlying stream name for the KV

    • timeout: number

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