Node Spec examples / Modules / node
Module: node
Table of contents
Enumerations
Type Aliases
- MetricData
- MetricMap
- NodeConfig
- NodeId
- NodePackage
- NodePackageMap
- NodeRuntime
- NodeService
- UserNodePackages
- UserNodes
- default
Functions
Type Aliases
MetricData
Ƭ MetricData: Object
Type declaration
Name | Type |
---|---|
x | number |
y | number |
Defined in
MetricMap
Ƭ MetricMap: Record
<string
, MetricData
>
Defined in
NodeConfig
Ƭ NodeConfig: Object
Type declaration
Name | Type |
---|---|
configValuesMap | ConfigValuesMap |
executionType? | ExecutionTypes |
Defined in
NodeId
Ƭ NodeId: string
Defined in
NodePackage
Ƭ NodePackage: Object
Type declaration
Name | Type | Description |
---|---|---|
config | NodeConfig | - |
createdTimestampMs | number | Timestamp the node was first created, UTC milliseconds |
id | NodeId | - |
lastStarted? | string | - |
lastStopped? | string | - |
nodes | default [] | - |
runtime | NodeRuntime | - |
services | NodeService [] | - |
spec | NodePackageSpecification | - |
status | NodeStatus | - |
stoppedBy? | NodeStoppedBy | - |
Defined in
NodePackageMap
Ƭ NodePackageMap: Record
<string
, NodePackage
>
Defined in
NodeRuntime
Ƭ NodeRuntime: Object
Type declaration
Name | Type |
---|---|
build? | string |
dataDir | string |
initialized? | boolean |
processIds? | string [] |
usage | { cpuPercent : MetricData [] | [] ; diskGBs : MetricData [] | [] ; memoryBytes : MetricData [] | [] ; syncedBlock : number } |
usage.cpuPercent | MetricData [] | [] |
usage.diskGBs | MetricData [] | [] |
usage.memoryBytes | MetricData [] | [] |
usage.syncedBlock | number |
Defined in
NodeService
Ƭ NodeService: Object
Type declaration
Name | Type |
---|---|
node | default |
serviceId | string |
serviceName | string |
Defined in
UserNodePackages
Ƭ UserNodePackages: Object
Type declaration
Name | Type |
---|---|
nodeIds | string [] |
nodes | NodePackageMap |
Defined in
UserNodes
Ƭ UserNodes: Object
Type declaration
Name | Type |
---|---|
nodeIds | string [] |
nodes | NodeMap |
Defined in
default
Ƭ default: Object
Type declaration
Name | Type | Description |
---|---|---|
config | NodeConfig | - |
createdTimestampMs | number | Timestamp the node was first created, UTC milliseconds |
id | NodeId | - |
lastStarted? | string | - |
lastStopped? | string | - |
runtime | NodeRuntime | - |
spec | NodeSpecification | - |
status | NodeStatus | - |
stoppedBy? | NodeStoppedBy | - |
Defined in
Functions
createNode
▸ createNode(input
): default
Parameters
Name | Type |
---|---|
input | Object |
input.initialConfigFromUser? | ConfigValuesMap |
input.runtime | NodeRuntime |
input.spec | NodeSpecification |
Returns
Defined in
createNodePackage
▸ createNodePackage(input
): NodePackage
Parameters
Name | Type |
---|---|
input | Object |
input.initialConfigFromUser? | ConfigValuesMap |
input.runtime | NodeRuntime |
input.spec | NodePackageSpecification |
Returns
Defined in
getContainerName
▸ getContainerName(node
): string
This naming convention supports a user running two of the same nodes, while still being human-readable. Returns just the specId for backwards compatibility.
Parameters
Name | Type |
---|---|
node | default |
Returns
string
"node.spec.specId-node.createdTimestampMs"
Defined in
isBinaryNode
▸ isBinaryNode(node
): boolean
Parameters
Name | Type |
---|---|
node | default |
Returns
boolean
Defined in
isDockerNode
▸ isDockerNode(node
): boolean
Parameters
Name | Type |
---|---|
node | default |
Returns
boolean