Preview environment

interface IShardingStrategy

export interface IShardingStrategy

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

connect() : Awaitable<void>

Initializes all the shards

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

Destroys all the shards

Fetches the status of all the shards

send(
shardId: number
) : Awaitable<void>

Sends a payload to a shard

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

Spawns all the shards