ClusterBootstrapOptionsBuilder
Esta página aún no está disponible en tu idioma.
Defined in: src/cluster/ClusterBootstrapOptions.ts:161
Fluent builder for ClusterBootstrapOptionsType — the sole input
to Cluster.bootstrap. name is required; everything else has
a sensible default. Polymorphic / whole-value fields (transport,
downing, discovery, failureDetector, seeds, roles, the
logger / config / persistence forwards) are passed as-is via a single
withX(value).
const { system, cluster, shutdown } = await Cluster.bootstrap( ClusterBootstrapOptions.create('my-app').withPort(2552),);Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ClusterBootstrapOptionsBuilder():
ClusterBootstrapOptionsBuilder
Returns
Section titled “Returns”ClusterBootstrapOptionsBuilder
Inherited from
Section titled “Inherited from”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”withAwaitReady()
Section titled “withAwaitReady()”withAwaitReady(
awaitReady):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:271
Wait for this node’s SelfUp before resolving — true (5 000 ms),
false/0 (immediate), or a millisecond budget.
Parameters
Section titled “Parameters”awaitReady
Section titled “awaitReady”number | boolean
Returns
Section titled “Returns”this
withConfig()
Section titled “withConfig()”withConfig(
config):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:184
Inline HOCON / config object forwarded to ActorSystem.create.
Parameters
Section titled “Parameters”config
Section titled “config”NonNullable<ConfigObject | Config | undefined>
Returns
Section titled “Returns”this
withConfigFile()
Section titled “withConfigFile()”withConfigFile(
configFile):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:189
Config file path forwarded to ActorSystem.create.
Parameters
Section titled “Parameters”configFile
Section titled “configFile”string
Returns
Section titled “Returns”this
withDiscovery()
Section titled “withDiscovery()”withDiscovery(
discovery):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:230
Discovery strategy — 'auto', a named provider, or a custom aggregate.
Parameters
Section titled “Parameters”discovery
Section titled “discovery”NonNullable<"config" | SeedProvider | "dns" | "kubernetes" | { providers: readonly SeedProvider[]; } | "auto" | undefined>
Returns
Section titled “Returns”this
withDowning()
Section titled “withDowning()”withDowning(
downing):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:258
Optional split-brain resolver.
Parameters
Section titled “Parameters”downing
Section titled “downing”Returns
Section titled “Returns”this
withFailureDetector()
Section titled “withFailureDetector()”withFailureDetector(
failureDetector):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:248
Failure-detector thresholds.
Parameters
Section titled “Parameters”failureDetector
Section titled “failureDetector”NonNullable<ClusterBootstrapOptionsType["failureDetector"]>
Returns
Section titled “Returns”this
withGossipIntervalMs()
Section titled “withGossipIntervalMs()”withGossipIntervalMs(
ms):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:253
How often gossip is pushed to a random reachable peer.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withHost()
Section titled “withHost()”withHost(
host):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:210
Bind host. Defaults resolve via POD_IP / HOSTNAME / 0.0.0.0.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withLogger()
Section titled “withLogger()”withLogger(
logger):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:174
Logger forwarded to ActorSystem.create.
Parameters
Section titled “Parameters”logger
Section titled “logger”Returns
Section titled “Returns”this
withLogLevel()
Section titled “withLogLevel()”withLogLevel(
logLevel):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:179
Log level forwarded to ActorSystem.create.
Parameters
Section titled “Parameters”logLevel
Section titled “logLevel”NonNullable<LogLevel | undefined>
Returns
Section titled “Returns”this
withPersistence()
Section titled “withPersistence()”withPersistence(
persistence):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:194
Persistence options forwarded to ActorSystem.create.
Parameters
Section titled “Parameters”persistence
Section titled “persistence”journal?
Section titled “journal?”snapshotStore?
Section titled “snapshotStore?”Returns
Section titled “Returns”this
withPort()
Section titled “withPort()”withPort(
port):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:215
Bind port. Defaults to CLUSTER_PORT env or 2552.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withReceptionist()
Section titled “withReceptionist()”withReceptionist(
enabled?):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:263
Auto-start the Receptionist extension. Default true.
Parameters
Section titled “Parameters”enabled?
Section titled “enabled?”boolean = true
Returns
Section titled “Returns”this
withRoles()
Section titled “withRoles()”withRoles(
roles):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:243
Role tags exposed to other members.
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”this
withSeeds()
Section titled “withSeeds()”withSeeds(
seeds):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:225
Explicit seed list. When set, discovery is ignored.
Parameters
Section titled “Parameters”readonly string[]
Returns
Section titled “Returns”this
withShutdownOnSignals()
Section titled “withShutdownOnSignals()”withShutdownOnSignals(
signals):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:203
Signals that trigger shutdown(). true (default) uses
['SIGTERM','SIGINT']; pass a list to customise or false to
disable.
Parameters
Section titled “Parameters”signals
Section titled “signals”NonNullable<boolean | readonly Signals[] | undefined>
Returns
Section titled “Returns”this
withStableObservation()
Section titled “withStableObservation()”withStableObservation(
stableObservation?):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:238
Run the stable-observation phase before joining — true for the
defaults, or an options object to override the timings. Default: off.
Parameters
Section titled “Parameters”stableObservation?
Section titled “stableObservation?”boolean | StableObservationTuning
Returns
Section titled “Returns”this
withTransport()
Section titled “withTransport()”withTransport(
transport):this
Defined in: src/cluster/ClusterBootstrapOptions.ts:220
Transport override. Default: TcpTransport.
Parameters
Section titled “Parameters”transport
Section titled “transport”Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate(name):ClusterBootstrapOptionsBuilder
Defined in: src/cluster/ClusterBootstrapOptions.ts:167
Start a fresh builder for the given ActorSystem name. name is the
one required field, so it is taken up-front rather than via a
separate withX.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”ClusterBootstrapOptionsBuilder
