Terafoundation: `interfaces`
Table of contents
Interfaces
- ConnectionConfig
- FoundationAPIs
- FoundationWorker
- LegacyFoundationApis
- PromMetrics
- PromMetricsAPIConfig
- PromMetricsInitConfig
Type Aliases
- ClientFactoryFn
- Cluster
- ContextAPIs
- CreateClientFactoryFn
- FoundationConfig
- FoundationContext
- FoundationSysConfig
- LogLevelConfig
- LogLevelType
- LogType
- MetricList
- ParsedArgs
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
terafoundation/src/interfaces.ts:41
Cluster
Ƭ Cluster: Overwrite
<NodeJSCluster
, { workers
: { [id: string]
: FoundationWorker
; } ; fork
: (env?
: any
) => FoundationWorker
}>
Defined in
terafoundation/src/interfaces.ts:92
ContextAPIs
Ƭ ContextAPIs: Object
Type declaration
Name | Type |
---|---|
foundation | FoundationAPIs |
registerAPI | (namespace : string , apis : any ) => void |
Defined in
terafoundation/src/interfaces.ts:75
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
terafoundation/src/interfaces.ts:47
FoundationConfig
Ƭ FoundationConfig<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 : FoundationSysConfig <S >) => string |
config_schema? | any | |
default_config_file? | string | |
descriptors? | Record <D , string > | |
master? | (context : FoundationContext <S , A , D >, config : FoundationConfig <S , A , D >) => void \ | Promise <void > |
name | string | |
schema_formats? | Format [] | |
script? | (context : FoundationContext <S , A , D >) => void \ | Promise <void > |
shutdownMessaging? | boolean | |
start_workers? | boolean | |
worker? | (context : FoundationContext <S , A , D >) => void \ | Promise <void > |
Defined in
terafoundation/src/interfaces.ts:12
FoundationContext
Ƭ FoundationContext<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 | FoundationSysConfig <S > |
Defined in
terafoundation/src/interfaces.ts:117
FoundationSysConfig
Ƭ FoundationSysConfig<S
>: { _nodeName
: string
; terafoundation
: { 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
} } & S
Type parameters
Name |
---|
S |
Defined in
terafoundation/src/interfaces.ts:99
LogLevelConfig
Ƭ LogLevelConfig: string
| { [type in LogType]: LogLevelType }[]
Defined in
terafoundation/src/interfaces.ts:82
LogLevelType
Ƭ LogLevelType: "trace"
| "debug"
| "info"
| "warn"
| "error"
| "fatal"
Defined in
terafoundation/src/interfaces.ts:81
LogType
Ƭ LogType: "console"
| "file"
Defined in
terafoundation/src/interfaces.ts:80
MetricList
Ƭ MetricList: Record
<string
, { functions?
: Set
<string
> ; metric?
: Gauge
<any
> | Counter
<any
> | Histogram
<any
> | Summary
<any
> ; name?
: string
}>
Defined in
terafoundation/src/interfaces.ts:153
ParsedArgs
Ƭ ParsedArgs<S
>: Object
Type parameters
Name |
---|
S |
Type declaration
Name | Type |
---|---|
configfile | FoundationSysConfig <S > |