declare class WorkerBootstrapperUtility class for bootstrapping a worker thread to be used for sharding
protectedreadonlydata : WorkerData
The data passed to the worker thread
protectedreadonlyshards : Collection<number, WebSocketShard>
The shards that are managed by this worker
bootstrap(options?: Readonly<BootstrapOptions>) : Promise<void>
options?: Readonly<BootstrapOptions>
Bootstraps the worker thread with the provided options
Helper method to initiate a shard's connection process
protected destroy(shardId: numberoptions?: WebSocketShardDestroyOptions) : Promise<void>
shardId: number
options?: WebSocketShardDestroyOptions
Helper method to destroy a shard
protected setupThreadEvents() : void
Helper method to attach event listeners to the parentPort