WorkerShardingStrategy

export declare class WorkerShardingStrategy implements IShardingStrategy
export declare class WorkerShardingStrategy implements IShardingStrategy
Strategy used to spawn threads in worker_threads
constructor(manager, options)
Constructs a new instance of the WorkerShardingStrategy class
NameTypeOptionalDescription
managerWebSocketManagerNoNone
optionsWorkerShardingStrategyOptionsNoNone
connect():Promise<void>
destroy(options?):Promise<void>
NameTypeOptionalDescription
optionsOmit<WebSocketShardDestroyOptions, 'recover'>YesNone
send(shardId, data):void
NameTypeOptionalDescription
shardIdnumberNoNone
dataGatewaySendPayloadNoNone
spawn(shardIds):Promise<void>
NameTypeOptionalDescription
shardIdsnumber[]NoNone