Перейти к содержимому
Русский

JetStreamKeyValueOptionsBuilder

Это содержимое пока не доступно на вашем языке.

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:54

new JetStreamKeyValueOptionsBuilder(): JetStreamKeyValueOptionsBuilder

JetStreamKeyValueOptionsBuilder

BrokerOptionsBuilder<JetStreamKeyValueOptionsType>.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

BrokerOptionsBuilder.build


withBucket(bucket): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:86

Bucket this actor operates on.

string

this


withCircuitBreaker(failureThreshold, resetMs): this

Defined in: src/io/broker/BrokerOptions.ts:125

Circuit breaker around connect attempts.

number

number

this

BrokerOptionsBuilder.withCircuitBreaker


withCreate(create): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:116

Create the bucket at connect time when missing. Default true.

boolean

this


withHistory(history): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:91

Revisions kept per key (create-time).

number

this


withMaxValueBytes(maxValueBytes): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:111

Server-side cap on a single value, in bytes (create-time).

number

this


withName(name): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:81

Client name reported to the server.

string

this


withOutboundBuffer(limit): this

Defined in: src/io/broker/BrokerOptions.ts:130

Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.

number

this

BrokerOptionsBuilder.withOutboundBuffer


withPassword(password): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:76

Password credential.

string

this


withReconnect(policy): this

Defined in: src/io/broker/BrokerOptions.ts:120

Reconnect policy (or false to disable auto-reconnect).

false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined

false


{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }

number

number

number

Cap on retry attempts. Default: Infinity (retry forever).

number


undefined

this

BrokerOptionsBuilder.withReconnect


withReplicas(replicas): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:106

Replica count (create-time).

number

this


withServers(servers): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:61

NATS server URLs ('nats://localhost:4222' or array).

string | readonly string[]

this


withStorage(storage): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:101

Bucket storage backing (create-time).

"memory" | "file"

this


withTimeToLive(timeToLive): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:96

Per-key time-to-live in milliseconds (create-time).

number

this


withToken(token): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:66

Token credential.

string

this


withUser(user): this

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:71

Username credential.

string

this


static create(): JetStreamKeyValueOptionsBuilder

Defined in: src/io/broker/JetStreamKeyValueOptions.ts:56

Start a fresh builder. Equivalent to new JetStreamKeyValueOptionsBuilder().

JetStreamKeyValueOptionsBuilder