Skip to main content

terafoundation / cluster-context / ClusterContext

Class: ClusterContext<S, A, D>

A Cluster Context (with worker processes), useful for scaling

Extends

Type parameters

Type parameterValue
SRecord<string, any>
ARecord<string, any>
D extends stringstring

Constructors

new ClusterContext()

new ClusterContext<S, A, D>(config, sysconfig): ClusterContext<S, A, D>

Parameters

ParameterType
configConfig<S, A, D>
sysconfigSysConfig<S>

Returns

ClusterContext<S, A, D>

Overrides

CoreContext.constructor

Source

cluster-context.ts:21

Properties

apis

readonly apis: ContextAPIs & A

Inherited from

CoreContext.apis

Source

core-context.ts:15


arch

readonly arch: Architecture = process.arch

Inherited from

CoreContext.arch

Source

core-context.ts:18


assignment

assignment: D

Inherited from

CoreContext.assignment

Source

core-context.ts:20


cluster

readonly cluster: Cluster

Inherited from

CoreContext.cluster

Source

core-context.ts:13


cluster_name?

optional cluster_name: string

Inherited from

CoreContext.cluster_name

Source

core-context.ts:21


logger

readonly logger: Logger

Inherited from

CoreContext.logger

Source

core-context.ts:16


name

readonly name: string

Inherited from

CoreContext.name

Source

core-context.ts:17


platform

readonly platform: Platform = process.platform

Inherited from

CoreContext.platform

Source

core-context.ts:19


sysconfig

readonly sysconfig: SysConfig<S>

Inherited from

CoreContext.sysconfig

Source

core-context.ts:14

Methods

createContext()

static createContext<S, A, D>(config): Promise<ClusterContext<S, A, D>>

Type parameters

Type parameterValue
SRecord<string, any>
ARecord<string, any>
D extends stringstring

Parameters

ParameterType
configConfig<S, A, D>

Returns

Promise<ClusterContext<S, A, D>>

Source

cluster-context.ts:90