ClusterInfo
Defined in: packages/sharding/src/cluster.ts:216
Information about a cluster. The object is live: it is updated as the cluster changes.
Properties
Section titled “Properties”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.
lastReadyAt?
Section titled “lastReadyAt?”
optionallastReadyAt?:number
Defined in: packages/sharding/src/cluster.ts:234
When any process of this cluster last reported ready.
process
Section titled “process”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.
readyAt?
Section titled “readyAt?”
optionalreadyAt?:number
Defined in: packages/sharding/src/cluster.ts:232
When the current process reported ready.
report?
Section titled “report?”
optionalreport?:WorkerReport
Defined in: packages/sharding/src/cluster.ts:236
The worker’s last health report.
restarts
Section titled “restarts”restarts:
number
Defined in: packages/sharding/src/cluster.ts:228
How many times it was restarted after a crash.
shards
Section titled “shards”shards:
number[]
Defined in: packages/sharding/src/cluster.ts:224
The shard IDs managed by this cluster.
startedAt
Section titled “startedAt”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.