Skip to content

StartSingletonSettings

Defined in: src/cluster/singleton/ClusterSingleton.ts:15

T

readonly optional acquireRetryIntervalMs?: number

Defined in: src/cluster/singleton/ClusterSingleton.ts:40

How often to retry lease.acquire() after a failed attempt (another holder owns it, transient backend error, etc.). Default: 5_000 ms. Ignored if no lease is provided.


readonly optional lease?: Lease

Defined in: src/cluster/singleton/ClusterSingleton.ts:34

Optional split-brain protection. When provided, the elected leader’s manager calls lease.acquire() before spawning the singleton — so a partition that produces two oldest views still only ever spawns the singleton on the side that holds the lease. The manager subscribes to lease.onLost(reason) and stops the child if ownership is revoked mid-flight.

Without a lease the manager keeps its current sync behaviour: spawn the moment cluster gossip says we’re leader, no external arbitration.


readonly props: Props<T>

Defined in: src/cluster/singleton/ClusterSingleton.ts:19

Props used to construct the singleton on the leader.


readonly optional role?: string

Defined in: src/cluster/singleton/ClusterSingleton.ts:21

If set, only nodes carrying this role tag will host the singleton.


readonly typeName: string

Defined in: src/cluster/singleton/ClusterSingleton.ts:17

Logical name for this singleton — used in the manager/child actor path.