class WorkerShardingStrategy

external
declare class WorkerShardingStrategy implements IShardingStrategy

Strategy used to spawn threads in worker_threads

Constructors

constructor()

Constructs a new instance of the WorkerShardingStrategy class

external
connect() : Promise<void>

Initializes all the shards

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

Destroys all the shards

external
fetchStatus() : Promise<Collection<number, WebSocketShardStatus>>

Fetches the status of all the shards

external
send() : void

Sends a payload to a shard

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

Spawns all the shards