terafoundation / cluster-context / ClusterContext
Class: ClusterContext<S, A, D>
A Cluster Context (with worker processes), useful for scaling
Extends
CoreContext
<S
,A
,D
>
Type parameters
Type parameter | Value |
---|---|
S | Record <string , any > |
A | Record <string , any > |
D extends string | string |
Constructors
new ClusterContext()
new ClusterContext<
S
,A
,D
>(config
,sysconfig
):ClusterContext
<S
,A
,D
>
Parameters
Parameter | Type |
---|---|
config | Config <S , A , D > |
sysconfig | SysConfig <S > |
Returns
ClusterContext
<S
, A
, D
>
Overrides
Source
Properties
apis
readonly
apis:ContextAPIs
&A
Inherited from
Source
arch
readonly
arch:Architecture
=process.arch
Inherited from
Source
assignment
assignment:
D
Inherited from
Source
cluster
readonly
cluster:Cluster
Inherited from
Source
cluster_name?
optional
cluster_name:string
Inherited from
Source
logger
readonly
logger:Logger
Inherited from
Source
name
readonly
name:string
Inherited from
Source
platform
readonly
platform:Platform
=process.platform
Inherited from
Source
sysconfig
readonly
sysconfig:SysConfig
<S
>
Inherited from
Source
Methods
createContext()
static
createContext<S
,A
,D
>(config
):Promise
<ClusterContext
<S
,A
,D
>>
Type parameters
Type parameter | Value |
---|---|
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
>>