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 |
|---|
ProtectedReadonly
The data passed to the worker thread
ProtectedReadonly
The shards that are managed by this worker
Bootstraps the worker thread with the provided options
| Name | Type | Optional | Description |
|---|---|---|---|
| options | Readonly<BootstrapOptions> | Yes | None |
Helper method to initiate a shard's connection process
| Name | Type | Optional | Description |
|---|---|---|---|
| shardId | number | No | None |
Helper method to destroy a shard
| Name | Type | Optional | Description |
|---|---|---|---|
| shardId | number | No | None |
| options | WebSocketShardDestroyOptions | Yes | None |
Helper method to attach event listeners to the parentPort