Skip to content

ClusterManagerEvents

Defined in: packages/sharding/src/cluster.ts:240

What ClusterManager emits.

clusterExit: [ClusterInfo, number | null, Signals | null, boolean]

Defined in: packages/sharding/src/cluster.ts:248

A cluster process exited. expected is true for a deliberate shutdown.


clusterGiveUp: [ClusterInfo]

Defined in: packages/sharding/src/cluster.ts:267

A cluster crashed too often and will not be restarted.


clusterMoved: [ClusterInfo, object]

Defined in: packages/sharding/src/cluster.ts:275

A lost host’s cluster is restarting on another host (remote.moveClusters).


clusterReady: [ClusterInfo]

Defined in: packages/sharding/src/cluster.ts:244

A cluster’s shards all finished their handshake.


clusterRestart: [ClusterInfo, object]

Defined in: packages/sharding/src/cluster.ts:255

A restart was scheduled after a crash.


clusterSpawn: [ClusterInfo]

Defined in: packages/sharding/src/cluster.ts:242

A cluster process was forked.


clusterStartTimeout: [ClusterInfo]

Defined in: packages/sharding/src/cluster.ts:265

A cluster did not report ready within startTimeout and was killed.


clusterUnstable: [ClusterInfo, object]

Defined in: packages/sharding/src/cluster.ts:260

A cluster keeps crashing: three or more restarts are pending or recent.


error: [Error]

Defined in: packages/sharding/src/cluster.ts:289

Something went wrong that did not stop the deployment (a bad frame, a failed recovery).


hostJoin: [string]

Defined in: packages/sharding/src/cluster.ts:271

A host joined the deployment.


hostLeave: [string, string]

Defined in: packages/sharding/src/cluster.ts:273

A host left or was lost. Its clusters are treated as crashed.


identify: [IdentifyEvent]

Defined in: packages/sharding/src/cluster.ts:285

The IDENTIFY queue: a shard asked for a slot, got it, or gave it back.


identifyWait: [object]

Defined in: packages/sharding/src/cluster.ts:281

An IDENTIFY is waiting for the session-start budget to reset.


leaderAcquired: []

Defined in: packages/sharding/src/cluster.ts:277

This coordinator took the leader lock and will start the clusters.


leaderLost: [string]

Defined in: packages/sharding/src/cluster.ts:279

This coordinator lost the leader lock and killed its clusters; it waits to lead again.


plan: [ClusterPlanInfo]

Defined in: packages/sharding/src/cluster.ts:283

The allocation of a start: total shards, the cluster count and where it came from, each cluster’s shards.


ready: []

Defined in: packages/sharding/src/cluster.ts:246

Every cluster is ready. Emitted again after a recovery.


shardsReassigned: [object]

Defined in: packages/sharding/src/cluster.ts:269

A failed cluster’s shards were moved to another cluster.


shutdown: [object]

Defined in: packages/sharding/src/cluster.ts:287

shutdownAll() finished: every cluster process has exited (or was killed after the timeout).