declare class WorkerShardingStrategy implements IShardingStrategyStrategy used to spawn threads in worker_threads
Constructors
constructor(manager: WebSocketManageroptions: WorkerShardingStrategyOptions)
manager: WebSocketManager
options: WorkerShardingStrategyOptions
Constructs a new instance of the WorkerShardingStrategy class
external destroy(options?: Omit<WebSocketShardDestroyOptions, 'recover'>) : Promise<void>
options?: Omit<WebSocketShardDestroyOptions, 'recover'>
Destroys all the shards
external fetchStatus() : Promise<Collection<number, WebSocketShardStatus>>
Fetches the status of all the shards
external send(shardId: numberdata: GatewaySendPayload) : void
shardId: number
data: GatewaySendPayload
Sends a payload to a shard