Search...

IShardingStrategy

interface IShardingStrategy 
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
NameTypeOptionalDescription
optionsOmit<WebSocketShardDestroyOptions, 'recover'>YesNone

send(shardId, payload)

:

Awaitable<void>

Sends a payload to a shard
NameTypeOptionalDescription
shardIdnumberNoNone
payloadGatewaySendPayloadNoNone

spawn(shardIds)

:

Awaitable<void>

Spawns all the shards
NameTypeOptionalDescription
shardIdsnumber[]NoNone