Preview environment

interface IShardingStrategy

external
interface IShardingStrategy

Strategies responsible for spawning, initializing connections, destroying shards, and relaying events

external
connect() : Awaitable<void>

Initializes all the shards

external
destroy(
options?: Omit<WebSocketShardDestroyOptions, 'recover'>
) : Awaitable<void>

Destroys all the shards

external
fetchStatus() : Awaitable<Collection<number, WebSocketShardStatus>>

Fetches the status of all the shards

external
send(
shardId: number
) : Awaitable<void>

Sends a payload to a shard

external
spawn(
shardIds: number[]
) : Awaitable<void>

Spawns all the shards