declare class WorkerBootstrapper
Utility class for bootstrapping a worker thread to be used for sharding
protectedreadonlyexternalWorkerData data :
The data passed to the worker thread
protectedreadonlyexternalCollection<number, WebSocketShard> shards :
The shards that are managed by this worker
external bootstrapoptions?: Readonly<BootstrapOptions>) : Promise<void> (
options?: Readonly<BootstrapOptions>
Bootstraps the worker thread with the provided options
Helper method to initiate a shard's connection process
protectedexternal destroyshardId: numberoptions?: WebSocketShardDestroyOptions) : Promise<void> (
shardId: number
options?: WebSocketShardDestroyOptions
Helper method to destroy a shard
protectedexternal setupThreadEventsvoid () :
Helper method to attach event listeners to the parentPort