Types: `terafoundation`
Table of contents
Interfaces
- ConnectionConfig
- FoundationAPIs
- FoundationWorker
- LegacyFoundationApis
- PromMetrics
- PromMetricsAPIConfig
- PromMetricsInitConfig
Type Aliases
- ClientFactoryFn
- Cluster
- Config
- Context
- ContextAPIs
- CreateClientFactoryFn
- Foundation
- Initializers
- LogLevelConfig
- LogLevelType
- LogType
- Schema
- SysConfig
- ValidationObj
- ValidatorFn
Type Aliases
ClientFactoryFn
Ƭ ClientFactoryFn: (config
: Record
<string
, any
>, logger
: Logger
, options
: ConnectionConfig
) => { client
: any
}
Type declaration
▸ (config
, logger
, options
): Object
Parameters
Name | Type |
---|---|
config | Record <string , any > |
logger | Logger |
options | ConnectionConfig |
Returns
Object
Name | Type |
---|---|
client | any |
Defined in
Cluster
Ƭ Cluster: Overwrite
<NodeJSCluster
, { workers
: { [id: string]
: FoundationWorker
; } ; fork
: (env?
: any
) => FoundationWorker
}>
Defined in
Config
Ƭ Config<S
, A
, D
>: Object
Type parameters
Name | Type |
---|---|
S | Record <string , any > |
A | Record <string , any > |
D | extends string = string |
Type declaration
Name | Type | |
---|---|---|
cluster_name? | string \ | (sysconfig : SysConfig <S >) => string |
config_schema? | any | |
default_config_file? | string | |
descriptors? | Record <D , string > | |
master? | (context : Context <S , A , D >, config : Config <S , A , D >) => void \ | Promise <void > |
name | string | |
schema_formats? | Format [] | |
script? | (context : Context <S , A , D >) => void \ | Promise <void > |
shutdownMessaging? | boolean | |
start_workers? | boolean | |
worker? | (context : Context <S , A , D >) => void \ | Promise <void > |
Defined in
Context
Ƭ Context<S
, A
, D
>: Object
Type parameters
Name | Type |
---|---|
S | Record <string , any > |
A | Record <string , any > |
D | extends string = string |
Type declaration
Name | Type |
---|---|
apis | ContextAPIs & A |
arch | string |
assignment | D |
cluster | Cluster |
cluster_name? | string |
foundation | LegacyFoundationApis |
logger | Logger |
name | string |
platform | string |
sysconfig | SysConfig <S > |
Defined in
ContextAPIs
Ƭ ContextAPIs: Object
Index signature
▪ [namespace: string
]: any
Type declaration
Name | Type |
---|---|
foundation | FoundationAPIs |
registerAPI | (namespace : string , apis : any ) => void |
Defined in
CreateClientFactoryFn
Ƭ CreateClientFactoryFn: (config
: Record
<string
, any
>, logger
: Logger
, options
: ConnectionConfig
) => Promise
<{ client
: any
}>
Type declaration
▸ (config
, logger
, options
): Promise
<{ client
: any
}>
Parameters
Name | Type |
---|---|
config | Record <string , any > |
logger | Logger |
options | ConnectionConfig |
Returns
Promise
<{ client
: any
}>
Defined in
Foundation
Ƭ Foundation: Object
Type declaration
Name | Type | |||
---|---|---|---|---|
asset_storage_bucket? | string | |||
asset_storage_connection | string | |||
asset_storage_connection_type | string | |||
connectors | Record <string , any > | |||
environment | "production" \ | "development" \ | "test" \ | string |
log_level | LogLevelConfig | |||
log_path | string | |||
logging | LogType [] | |||
prom_metrics_add_default | boolean | |||
prom_metrics_enabled | boolean | |||
prom_metrics_port | number | |||
workers | number |
Defined in
Initializers
Ƭ Initializers<S
>: Object
Type parameters
Name |
---|
S |
Type declaration
Name | Type |
---|---|
schema | Schema <Record <string , any >> |
validatorFn? | ValidatorFn <S > |
Defined in
LogLevelConfig
Ƭ LogLevelConfig: string
| { [type in LogType]: LogLevelType }[]
Defined in
LogLevelType
Ƭ LogLevelType: "trace"
| "debug"
| "info"
| "warn"
| "error"
| "fatal"
Defined in
LogType
Ƭ LogType: "console"
| "file"
Defined in
Schema
Ƭ Schema<T
>: { [P in keyof T]: Schema<T[P]> | SchemaObj<T[P]> }
Type parameters
Name |
---|
T |
Defined in
SysConfig
Ƭ SysConfig<S
>: { _nodeName
: string
; terafoundation
: Foundation
} & S
Type parameters
Name |
---|
S |
Defined in
ValidationObj
Ƭ ValidationObj<S
>: Object
Type parameters
Name |
---|
S |
Type declaration
Name | Type |
---|---|
connector? | boolean |
subconfig | Record <string , any > |
validatorFn? | ValidatorFn <S > |
Defined in
ValidatorFn
Ƭ ValidatorFn<S
>: (subconfig
: Record
<string
, any
>, sysconfig
: SysConfig
<S
>) => void
Type parameters
Name |
---|
S |
Type declaration
▸ (subconfig
, sysconfig
): void
Parameters
Name | Type |
---|---|
subconfig | Record <string , any > |
sysconfig | SysConfig <S > |
Returns
void