terafoundation / cluster-context / ClusterContext
Class: ClusterContext<S, A, D>
Defined in: cluster-context.ts:16
A Cluster Context (with worker processes), useful for scaling
Extends
CoreContext<S,A,D>
Type Parameters
| Type Parameter | Default type |
|---|---|
S | Record<string, any> |
A | Record<string, any> |
D extends string | string |
Constructors
Constructor
new ClusterContext<
S,A,D>(config,sysconfig):ClusterContext<S,A,D>
Defined in: cluster-context.ts:21
Parameters
| Parameter | Type |
|---|---|
config | Config<S, A, D> |
sysconfig | SysConfig<S> |
Returns
ClusterContext<S, A, D>
Overrides
Properties
| Property | Modifier | Type | Default value | Inherited from | Defined in |
|---|---|---|---|---|---|
apis | readonly | ContextAPIs & A | undefined | CoreContext.apis | core-context.ts:15 |
arch | readonly | Architecture | process.arch | CoreContext.arch | core-context.ts:18 |
assignment | public | D | undefined | CoreContext.assignment | core-context.ts:20 |
cluster | readonly | Cluster | undefined | CoreContext.cluster | core-context.ts:13 |
cluster_name? | public | string | undefined | CoreContext.cluster_name | core-context.ts:21 |
logger | readonly | Logger | undefined | CoreContext.logger | core-context.ts:16 |
name | readonly | string | undefined | CoreContext.name | core-context.ts:17 |
platform | readonly | Platform | process.platform | CoreContext.platform | core-context.ts:19 |
sysconfig | readonly | SysConfig<S> | undefined | CoreContext.sysconfig | core-context.ts:14 |
Methods
createContext()
staticcreateContext<S,A,D>(config):Promise<ClusterContext<S,A,D>>
Defined in: cluster-context.ts:90
Type Parameters
| Type Parameter | Default type |
|---|---|
S | Record<string, any> |
A | Record<string, any> |
D extends string | string |
Parameters
| Parameter | Type |
|---|---|
config | Config<S, A, D> |
Returns
Promise<ClusterContext<S, A, D>>