Class

ClusterManager

Constructor

new ClusterManager(options: ClusterManagerOptions)

Properties

NameTypeDescription
currentLeaseread-onlyShardLease | null

Methods

.destroy()

Promise<void>

await clusterManager.destroy();

.start(spawnLocal)

spawnLocal: (lease: ShardLease, plan: ReshardPlan) => Promise<void>Promise<ShardLease>

Claim shards and start heartbeating. spawnLocal receives the leased shard ids and total shard count from the plan.

await clusterManager.start(spawnLocal);