Pular para o conteúdo
Português (BR)

ClusterBootstrapOptionsBuilder

Este conteúdo não está disponível em sua língua ainda.

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),
);

new ClusterBootstrapOptionsBuilder(): ClusterBootstrapOptionsBuilder

ClusterBootstrapOptionsBuilder

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

OptionsBuilder.build


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.

number | boolean

this


withConfig(config): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:184

Inline HOCON / config object forwarded to ActorSystem.create.

NonNullable<ConfigObject | Config | undefined>

this


withConfigFile(configFile): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:189

Config file path forwarded to ActorSystem.create.

string

this


withDiscovery(discovery): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:230

Discovery strategy — 'auto', a named provider, or a custom aggregate.

NonNullable<"config" | SeedProvider | "dns" | "kubernetes" | { providers: readonly SeedProvider[]; } | "auto" | undefined>

this


withDowning(downing): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:258

Optional split-brain resolver.

DowningProvider

this


withFailureDetector(failureDetector): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:248

Failure-detector thresholds.

NonNullable<ClusterBootstrapOptionsType["failureDetector"]>

this


withGossipIntervalMs(ms): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:253

How often gossip is pushed to a random reachable peer.

number

this


withHost(host): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:210

Bind host. Defaults resolve via POD_IP / HOSTNAME / 0.0.0.0.

string

this


withLogger(logger): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:174

Logger forwarded to ActorSystem.create.

Logger

this


withLogLevel(logLevel): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:179

Log level forwarded to ActorSystem.create.

NonNullable<LogLevel | undefined>

this


withPersistence(persistence): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:194

Persistence options forwarded to ActorSystem.create.

Journal

SnapshotStore

this


withPort(port): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:215

Bind port. Defaults to CLUSTER_PORT env or 2552.

number

this


withReceptionist(enabled?): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:263

Auto-start the Receptionist extension. Default true.

boolean = true

this


withRoles(roles): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:243

Role tags exposed to other members.

string[]

this


withSeeds(seeds): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:225

Explicit seed list. When set, discovery is ignored.

readonly string[]

this


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.

NonNullable<boolean | readonly Signals[] | undefined>

this


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.

boolean | StableObservationTuning

this


withTransport(transport): this

Defined in: src/cluster/ClusterBootstrapOptions.ts:220

Transport override. Default: TcpTransport.

Transport

this


static create(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.

string

ClusterBootstrapOptionsBuilder