ClusterContext
Defined in: packages/sharding/src/context.ts:5
What a cluster worker knows about itself. ClusterManager sets it through
environment variables; readClusterContext reads it back.
Properties
Section titled “Properties”clusterCount
Section titled “clusterCount”clusterCount:
number
Defined in: packages/sharding/src/context.ts:9
How many clusters the deployment started.
clusterId
Section titled “clusterId”clusterId:
number
Defined in: packages/sharding/src/context.ts:7
This cluster’s ID.
coordinatedIdentify
Section titled “coordinatedIdentify”coordinatedIdentify:
boolean
Defined in: packages/sharding/src/context.ts:15
Whether the parent hands out IDENTIFY slots for this cluster.
readyTimeout?
Section titled “readyTimeout?”
optionalreadyTimeout?:number
Defined in: packages/sharding/src/context.ts:23
Sequential startup: ms a shard may take to become READY (LUNIBEE_READY_TIMEOUT, the parent’s identify.holdTimeout).
shardCount
Section titled “shardCount”shardCount:
number
Defined in: packages/sharding/src/context.ts:11
Total shards in the deployment (what Discord calls num_shards).
shardIds
Section titled “shardIds”shardIds:
number[]
Defined in: packages/sharding/src/context.ts:13
Shards this cluster owns.
startup?
Section titled “startup?”
optionalstartup?:"safe"|"sequential"
Defined in: packages/sharding/src/context.ts:21
"sequential": hold each IDENTIFY slot until the shard is READY, so the
deployment starts one shard at a time. "safe" (default): release it once
the IDENTIFY is sent.