SimpleShardingStrategy
export declare class SimpleShardingStrategy implements IShardingStrategy
export declare class SimpleShardingStrategy implements IShardingStrategy
Simple strategy that just spawns shards in the current process
Implements
IShardingStrategyconstructor(manager)
Constructs a new instance of the
SimpleShardingStrategy
className | Type | Optional | Description |
---|---|---|---|
manager | WebSocketManager | No | None |
connect()
:
Promise<void>
destroy(options?)
:
Promise<void>
Name | Type | Optional | Description |
---|---|---|---|
options | Omit<WebSocketShardDestroyOptions, 'recover'> | Yes | None |
send(shardId, payload)
:
Promise<void>
Name | Type | Optional | Description |
---|---|---|---|
shardId | number | No | None |
payload | GatewaySendPayload | No | None |
spawn(shardIds)
:
Promise<void>
Name | Type | Optional | Description |
---|---|---|---|
shardIds | number[] | No | None |