Interface KvStatus

interface KvStatus {
    backingStore: StorageType;
    bucket: string;
    compression?: boolean;
    description: string;
    history: number;
    max_bytes: number;
    maxValueSize: number;
    metadata?: Record<string, string>;
    mirror?: StreamSource;
    placement: Placement;
    replicas: number;
    republish: Republish;
    size: number;
    sources?: StreamSource[];
    storage: StorageType;
    streamInfo: StreamInfo;
    ttl: number;
    values: number;
}

Hierarchy (view full)

Properties

backingStore: StorageType

deprecated: use storage FIXME: remove this on 1.8

bucket: string

The simple name for a Kv - this name is typically prefixed by KV_.

compression?: boolean

Sets the compression level of the KV. This feature is only supported in servers 2.10.x and better.

description: string

Sets the specified description on the stream of the KV.

history: number

Number of maximum messages allowed per subject (key).

max_bytes: number

The maximum number of bytes on the KV

maxValueSize: number

The maximum size of a value on the KV

metadata?: Record<string, string>

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

mirror?: StreamSource

Maintains a 1:1 mirror of another kv stream with name matching this property.

placement: Placement

Placement hints for the stream hosting the KV

replicas: number

Number of replicas for the KV (1,3,or 5).

republish: Republish

Republishes edits to the KV on a NATS core subject.

size: number

Size of the bucket in bytes

sources?: StreamSource[]

List of Stream names to replicate into this KV

storage: StorageType

The backing store of the stream hosting the KV

streamInfo: StreamInfo

The StreamInfo backing up the KV

ttl: number

The maximum number of millis the key should live in the KV. The server will automatically remove keys older than this amount. Note that deletion of delete markers are not performed.

values: number

Number of entries in the KV