Class WorkerShardingStrategy

Strategy used to spawn threads in worker_threads

Hierarchy

  • WorkerShardingStrategy

Implements

Constructors

Properties

#private: any
connectPromises: any
destroyPromises: any
ensureThrottler: any
fetchStatusPromises: any
manager: any
onMessage: any
options: any
resolveWorkerPath: any
setupWorker: any
throttler?: any
waitForIdentifyControllers: any
waitForWorkerReady: any

Methods

  • Initializes all the shards

    Returns Promise<void>

  • Sends a payload to a shard

    Parameters

    • shardId: number
    • data: GatewaySendPayload

    Returns void

  • Spawns all the shards

    Parameters

    • shardIds: number[]

    Returns Promise<void>

Generated using TypeDoc