class WorkerShardingStrategy

export declare class WorkerShardingStrategy implements IShardingStrategy

Strategy used to spawn threads in worker_threads

Constructors

constructor()

Constructs a new instance of the WorkerShardingStrategy class

connect() : Promise<void>

Initializes all the shards

destroy(
options?: Omit<WebSocketShardDestroyOptions, 'recover'>
) : Promise<void>

Destroys all the shards

Fetches the status of all the shards

send() : void

Sends a payload to a shard

spawn(
shardIds: number[]
) : Promise<void>

Spawns all the shards