export declare interface IShardingStrategy
export declare interface IShardingStrategy
Strategies responsible for spawning, initializing connections, destroying shards, and relaying events
connect()
:
Awaitable<void>
Initializes all the shards
destroy(options?)
:
Awaitable<void>
Destroys all the shards
Name | Type | Optional | Description |
---|---|---|---|
options | Omit<WebSocketShardDestroyOptions, 'recover'> | Yes | None |
Fetches the status of all the shards
send(shardId, payload)
:
Awaitable<void>
Sends a payload to a shard
Name | Type | Optional | Description |
---|---|---|---|
shardId | number | No | None |
payload | GatewaySendPayload | No | None |
spawn(shardIds)
:
Awaitable<void>
Spawns all the shards
Name | Type | Optional | Description |
---|---|---|---|
shardIds | number[] | No | None |