Skip to content

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.

Record<string, string | undefined> = process.env

ClusterContext | null

The context, or null when this process is not a cluster worker.

If the variables are present but malformed.