JetStreamKeyValueOptionsBuilder
Este conteúdo não está disponível em sua língua ainda.
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:54
Extends
Section titled “Extends”BrokerOptionsBuilder<JetStreamKeyValueOptionsType>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new JetStreamKeyValueOptionsBuilder():
JetStreamKeyValueOptionsBuilder
Returns
Section titled “Returns”JetStreamKeyValueOptionsBuilder
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder<JetStreamKeyValueOptionsType>.constructor
Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.build
withBucket()
Section titled “withBucket()”withBucket(
bucket):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:86
Bucket this actor operates on.
Parameters
Section titled “Parameters”bucket
Section titled “bucket”string
Returns
Section titled “Returns”this
withCircuitBreaker()
Section titled “withCircuitBreaker()”withCircuitBreaker(
failureThreshold,resetMs):this
Defined in: src/io/broker/BrokerOptions.ts:125
Circuit breaker around connect attempts.
Parameters
Section titled “Parameters”failureThreshold
Section titled “failureThreshold”number
resetMs
Section titled “resetMs”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withCircuitBreaker
withCreate()
Section titled “withCreate()”withCreate(
create):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:116
Create the bucket at connect time when missing. Default true.
Parameters
Section titled “Parameters”create
Section titled “create”boolean
Returns
Section titled “Returns”this
withHistory()
Section titled “withHistory()”withHistory(
history):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:91
Revisions kept per key (create-time).
Parameters
Section titled “Parameters”history
Section titled “history”number
Returns
Section titled “Returns”this
withMaxValueBytes()
Section titled “withMaxValueBytes()”withMaxValueBytes(
maxValueBytes):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:111
Server-side cap on a single value, in bytes (create-time).
Parameters
Section titled “Parameters”maxValueBytes
Section titled “maxValueBytes”number
Returns
Section titled “Returns”this
withName()
Section titled “withName()”withName(
name):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:81
Client name reported to the server.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withOutboundBuffer()
Section titled “withOutboundBuffer()”withOutboundBuffer(
limit):this
Defined in: src/io/broker/BrokerOptions.ts:130
Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withOutboundBuffer
withPassword()
Section titled “withPassword()”withPassword(
password):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:76
Password credential.
Parameters
Section titled “Parameters”password
Section titled “password”string
Returns
Section titled “Returns”this
withReconnect()
Section titled “withReconnect()”withReconnect(
policy):this
Defined in: src/io/broker/BrokerOptions.ts:120
Reconnect policy (or false to disable auto-reconnect).
Parameters
Section titled “Parameters”policy
Section titled “policy”false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined
false
Type Literal
Section titled “Type Literal”{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }
factor?
Section titled “factor?”number
initialDelayMs?
Section titled “initialDelayMs?”number
maxAttempts?
Section titled “maxAttempts?”number
Cap on retry attempts. Default: Infinity (retry forever).
maxDelayMs?
Section titled “maxDelayMs?”number
undefined
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withReconnect
withReplicas()
Section titled “withReplicas()”withReplicas(
replicas):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:106
Replica count (create-time).
Parameters
Section titled “Parameters”replicas
Section titled “replicas”number
Returns
Section titled “Returns”this
withServers()
Section titled “withServers()”withServers(
servers):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:61
NATS server URLs ('nats://localhost:4222' or array).
Parameters
Section titled “Parameters”servers
Section titled “servers”string | readonly string[]
Returns
Section titled “Returns”this
withStorage()
Section titled “withStorage()”withStorage(
storage):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:101
Bucket storage backing (create-time).
Parameters
Section titled “Parameters”storage
Section titled “storage”"memory" | "file"
Returns
Section titled “Returns”this
withTimeToLive()
Section titled “withTimeToLive()”withTimeToLive(
timeToLive):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:96
Per-key time-to-live in milliseconds (create-time).
Parameters
Section titled “Parameters”timeToLive
Section titled “timeToLive”number
Returns
Section titled “Returns”this
withToken()
Section titled “withToken()”withToken(
token):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:66
Token credential.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withUser()
Section titled “withUser()”withUser(
user):this
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:71
Username credential.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate():JetStreamKeyValueOptionsBuilder
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:56
Start a fresh builder. Equivalent to new JetStreamKeyValueOptionsBuilder().
Returns
Section titled “Returns”JetStreamKeyValueOptionsBuilder
