Skip to main content

terafoundation / process-context / ProcessContext

Class: ProcessContext<S, A, D>

Defined in: process-context.ts:17

A Single Process Context, this should be used when running in a single process instance/container. This context doesn't support some of the multiple worker/assignment variations that ClusterContext does, like master or worker.

Todo​

add process event handler listeners in initialize method

Todo​

add shutdown handler logic with shutdown method

Extends​

Type Parameters​

Type ParameterDefault type
SRecord<string, any>
ARecord<string, any>
D extends stringstring

Constructors​

Constructor​

new ProcessContext<S, A, D>(config, cluster, sysconfig, assignment?): ProcessContext<S, A, D>

Defined in: core-context.ts:23

Parameters​

ParameterType
configConfig<S, A, D>
clusterCluster
sysconfigSysConfig<S>
assignment?D

Returns​

ProcessContext<S, A, D>

Inherited from​

CoreContext.constructor

Properties​

PropertyModifierTypeDefault valueInherited fromDefined in
apisreadonlyContextAPIs & AundefinedCoreContext.apiscore-context.ts:15
archreadonlyArchitectureprocess.archCoreContext.archcore-context.ts:18
assignmentpublicDundefinedCoreContext.assignmentcore-context.ts:20
clusterreadonlyClusterundefinedCoreContext.clustercore-context.ts:13
cluster_name?publicstringundefinedCoreContext.cluster_namecore-context.ts:21
loggerreadonlyLoggerundefinedCoreContext.loggercore-context.ts:16
namereadonlystringundefinedCoreContext.namecore-context.ts:17
platformreadonlyPlatformprocess.platformCoreContext.platformcore-context.ts:19
sysconfigreadonlySysConfig<S>undefinedCoreContext.sysconfigcore-context.ts:14

Methods​

createContext()​

static createContext<S, A, D>(config, overrideArgs?): Promise<ProcessContext<S, A, D>>

Defined in: process-context.ts:22

Type Parameters​

Type ParameterDefault type
SRecord<string, any>
ARecord<string, any>
D extends stringstring

Parameters​

ParameterType
configConfig<S, A, D>
overrideArgs?ParsedArgs<S>

Returns​

Promise<ProcessContext<S, A, D>>