Skip to content

ClusterInfo

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

Information about a cluster. The object is live: it is updated as the cluster changes.

host: string

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

Where it runs: "local" or a host ID.


id: number

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

Cluster identifier.


optional lastReadyAt?: number

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

When any process of this cluster last reported ready.


process: ChildProcess

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

The current child process (the last one while a restart is pending). For a cluster on another host this is a proxy; pid is the pid on that host.


optional readyAt?: number

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

When the current process reported ready.


optional report?: WorkerReport

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

The worker’s last health report.


restarts: number

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

How many times it was restarted after a crash.


shards: number[]

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

The shard IDs managed by this cluster.


startedAt: number

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

When the current process was forked (epoch ms).


state: ClusterState

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

Where the cluster is in its life.