Class WorkerBootstrapper

Utility class for bootstrapping a worker thread to be used for sharding

Hierarchy

  • WorkerBootstrapper

Constructors

Properties

The data passed to the worker thread

shards: Collection<number, WebSocketShard>

The shards that are managed by this worker

Methods

  • Bootstraps the worker thread with the provided options

    Parameters

    Returns Promise<void>

  • Helper method to initiate a shard's connection process

    Parameters

    • shardId: number

    Returns Promise<void>

  • Helper method to destroy a shard

    Parameters

    Returns Promise<void>

  • Helper method to attach event listeners to the parentPort

    Returns void

Generated using TypeDoc