declare class WorkerBootstrapperUtility class for bootstrapping a worker thread to be used for sharding
protectedreadonlyexternaldata : WorkerData
The data passed to the worker thread
protectedreadonlyexternalshards : Collection<number, WebSocketShard>
The shards that are managed by this worker
external 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
protectedexternal destroy(shardId: numberoptions?: WebSocketShardDestroyOptions) : Promise<void>
shardId: number
options?: WebSocketShardDestroyOptions
Helper method to destroy a shard
protectedexternal setupThreadEvents() : void
Helper method to attach event listeners to the parentPort