Aller au contenu
Français

ClusterBootstrapOptions

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/cluster/ClusterBootstrap.ts:18

Options accepted by Cluster.bootstrap. Everything is optional except name; sensible defaults turn the call into a single-line hello-cluster.

readonly optional awaitReady?: number | boolean

Defined in: src/cluster/ClusterBootstrap.ts:107

Wait for this node’s SelfUp event before resolving.

  • true (default) — wait up to 5 000 ms.
  • false / 0 — return immediately.
  • a number — wait at most that many ms.

On timeout the returned promise still resolves — the cluster keeps trying in the background. Set a custom value when seed contact is slow (e.g. K8s pod start lag).


readonly optional config?: ConfigObject | Config

Defined in: src/cluster/ClusterBootstrap.ts:27


readonly optional configFile?: string

Defined in: src/cluster/ClusterBootstrap.ts:28


readonly optional discovery?: "config" | SeedProvider | "dns" | "kubernetes" | { providers: readonly SeedProvider[]; } | "auto"

Defined in: src/cluster/ClusterBootstrap.ts:76

Discovery strategy. Values:

  • 'auto' (default) — env-driven autoDiscovery chain.
  • 'kubernetes' | 'dns' | 'config' — pin to a single provider, still configured from env vars.
  • a SeedProvider instance — use as-is.
  • { providers: [...] } — assemble a custom aggregate chain.

Ignored when seeds is set.


readonly optional downing?: DowningProvider

Defined in: src/cluster/ClusterBootstrap.ts:87


readonly optional failureDetector?: Partial<FailureDetectorSettings>

Defined in: src/cluster/ClusterBootstrap.ts:85


readonly optional gossipIntervalMs?: number

Defined in: src/cluster/ClusterBootstrap.ts:86


readonly optional host?: string

Defined in: src/cluster/ClusterBootstrap.ts:48

Bind host. Default resolution order:

  1. opts.host
  2. process.env.POD_IP (Kubernetes)
  3. process.env.HOSTNAME
  4. '0.0.0.0'

readonly optional logger?: Logger

Defined in: src/cluster/ClusterBootstrap.ts:25

Optional logger / log level / config overrides — forwarded to ActorSystem.create.


readonly optional logLevel?: LogLevel

Defined in: src/cluster/ClusterBootstrap.ts:26


readonly name: string

Defined in: src/cluster/ClusterBootstrap.ts:22

ActorSystem name.


readonly optional persistence?: object

Defined in: src/cluster/ClusterBootstrap.ts:29

readonly optional journal?: Journal

readonly optional snapshotStore?: SnapshotStore


readonly optional port?: number

Defined in: src/cluster/ClusterBootstrap.ts:54

Bind port. Default: process.env.CLUSTER_PORT (when present and a finite integer), otherwise 2552.


readonly optional receptionist?: boolean

Defined in: src/cluster/ClusterBootstrap.ts:94

Auto-start the Receptionist extension so service-key lookups (Find, Subscribe) work without explicit wiring. Default: true.


readonly optional roles?: string[]

Defined in: src/cluster/ClusterBootstrap.ts:84


readonly optional seeds?: readonly string[]

Defined in: src/cluster/ClusterBootstrap.ts:63

Explicit seed list. When set, discovery is ignored and the cluster contacts exactly these addresses.


readonly optional shutdownOnSignals?: boolean | readonly Signals[]

Defined in: src/cluster/ClusterBootstrap.ts:37

Whether the bootstrap helper installs SIGTERM + SIGINT handlers that call the returned shutdown() once. Set to a list of signals to customise, or to false to disable. Default: ['SIGTERM', 'SIGINT'].


readonly optional transport?: Transport

Defined in: src/cluster/ClusterBootstrap.ts:57

Transport override. Default: TcpTransport.