export declare class WorkerBootstrapper export declare class WorkerBootstrapper Utility class for bootstrapping a worker thread to be used for sharding
constructor()
Constructs a new instance of the 
WorkerBootstrapper class| Name | Type | Optional | Description | 
|---|
Readonly
The data passed to the worker thread
Readonly
The shards that are managed by this worker
bootstrap(options?)
:
Promise<void>
Bootstraps the worker thread with the provided options
| Name | Type | Optional | Description | 
|---|---|---|---|
| options | Readonly<BootstrapOptions> | Yes | None | 
Protected
connect(shardId)
:
Promise<void>
Helper method to initiate a shard's connection process
| Name | Type | Optional | Description | 
|---|---|---|---|
| shardId | number | No | None | 
Protected
destroy(shardId, options?)
:
Promise<void>
Helper method to destroy a shard
| Name | Type | Optional | Description | 
|---|---|---|---|
| shardId | number | No | None | 
| options | WebSocketShardDestroyOptions | Yes | None | 
Protected
setupThreadEvents()
:
void
Helper method to attach event listeners to the parentPort