readClusterContext
readClusterContext(
env?):ClusterContext|null
Defined in: packages/sharding/src/context.ts:194
Reads the worker contract from the environment: CLUSTER_ID, CLUSTER_COUNT,
SHARD_COUNT, SHARD_LIST (comma separated) and LUNIBEE_IDENTIFY.
Parameters
Section titled “Parameters”Record<string, string | undefined> = process.env
Returns
Section titled “Returns”ClusterContext | null
The context, or null when this process is not a cluster worker.
Throws
Section titled “Throws”If the variables are present but malformed.