Skip to content

Node Spec examples / Modules / node

Module: node

Table of contents

Enumerations

Type Aliases

Functions

Type Aliases

MetricData

Ƭ MetricData: Object

Type declaration

NameType
xnumber
ynumber

Defined in

node.ts:44


MetricMap

Ƭ MetricMap: Record<string, MetricData>

Defined in

node.ts:48


NodeConfig

Ƭ NodeConfig: Object

Type declaration

NameType
configValuesMapConfigValuesMap
executionType?ExecutionTypes

Defined in

node.ts:39


NodeId

Ƭ NodeId: string

Defined in

node.ts:10


NodePackage

Ƭ NodePackage: Object

Type declaration

NameTypeDescription
configNodeConfig-
createdTimestampMsnumberTimestamp the node was first created, UTC milliseconds
idNodeId-
lastStarted?string-
lastStopped?string-
nodesdefault[]-
runtimeNodeRuntime-
servicesNodeService[]-
specNodePackageSpecification-
statusNodeStatus-
stoppedBy?NodeStoppedBy-

Defined in

node.ts:90


NodePackageMap

Ƭ NodePackageMap: Record<string, NodePackage>

Defined in

node.ts:106


NodeRuntime

Ƭ NodeRuntime: Object

Type declaration

NameType
build?string
dataDirstring
initialized?boolean
processIds?string[]
usage{ cpuPercent: MetricData[] | [] ; diskGBs: MetricData[] | [] ; memoryBytes: MetricData[] | [] ; syncedBlock: number }
usage.cpuPercentMetricData[] | []
usage.diskGBsMetricData[] | []
usage.memoryBytesMetricData[] | []
usage.syncedBlocknumber

Defined in

node.ts:52


NodeService

Ƭ NodeService: Object

Type declaration

NameType
nodedefault
serviceIdstring
serviceNamestring

Defined in

node.ts:85


UserNodePackages

Ƭ UserNodePackages: Object

Type declaration

NameType
nodeIdsstring[]
nodesNodePackageMap

Defined in

node.ts:108


UserNodes

Ƭ UserNodes: Object

Type declaration

NameType
nodeIdsstring[]
nodesNodeMap

Defined in

node.ts:81


default

Ƭ default: Object

Type declaration

NameTypeDescription
configNodeConfig-
createdTimestampMsnumberTimestamp the node was first created, UTC milliseconds
idNodeId-
lastStarted?string-
lastStopped?string-
runtimeNodeRuntime-
specNodeSpecification-
statusNodeStatus-
stoppedBy?NodeStoppedBy-

Defined in

node.ts:66

Functions

createNode

createNode(input): default

Parameters

NameType
inputObject
input.initialConfigFromUser?ConfigValuesMap
input.runtimeNodeRuntime
input.specNodeSpecification

Returns

default

Defined in

node.ts:133


createNodePackage

createNodePackage(input): NodePackage

Parameters

NameType
inputObject
input.initialConfigFromUser?ConfigValuesMap
input.runtimeNodeRuntime
input.specNodePackageSpecification

Returns

NodePackage

Defined in

node.ts:167


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

NameType
nodedefault

Returns

string

"node.spec.specId-node.createdTimestampMs"

Defined in

node.ts:211


isBinaryNode

isBinaryNode(node): boolean

Parameters

NameType
nodedefault

Returns

boolean

Defined in

node.ts:123


isDockerNode

isDockerNode(node): boolean

Parameters

NameType
nodedefault

Returns

boolean

Defined in

node.ts:113

Released under the MIT License