Search...

SimpleShardingStrategy

export declare class SimpleShardingStrategy implements IShardingStrategy 
export declare class SimpleShardingStrategy implements IShardingStrategy 
Simple strategy that just spawns shards in the current process

constructor(manager)

Constructs a new instance of the SimpleShardingStrategy class
NameTypeOptionalDescription
managerWebSocketManagerNoNone

connect()

:

Promise<void>

destroy(options?)

:

Promise<void>

NameTypeOptionalDescription
optionsOmit<WebSocketShardDestroyOptions, 'recover'>YesNone

send(shardId, payload)

:

Promise<void>

NameTypeOptionalDescription
shardIdnumberNoNone
payloadGatewaySendPayloadNoNone

spawn(shardIds)

:

Promise<void>

NameTypeOptionalDescription
shardIdsnumber[]NoNone