Preview environment

class SimpleShardingStrategy

export declare class SimpleShardingStrategy implements IShardingStrategy

Simple strategy that just spawns shards in the current process

Constructors

constructor()

Constructs a new instance of the SimpleShardingStrategy class

connect() : Promise<void>

Initializes all the shards

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

Destroys all the shards

fetchStatus() : Promise<Collection<number, import("../../ws/WebSocketShard.js").WebSocketShardStatus>>

Fetches the status of all the shards

send(
shardId: number
) : Promise<void>

Sends a payload to a shard

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

Spawns all the shards