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