JS API Reference

Class: NetworkNode

network/node.NetworkNode

Describes a node in a VPN, mapping a Golem node id to an IP address

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NetworkNode(id, ip, getNetworkInfo, apiUrl): NetworkNode

Parameters

NameType
idstring
ipIPv4
getNetworkInfo() => NetworkInfo
apiUrlstring

Returns

NetworkNode

Defined in

src/network/node.ts:8

Properties

id

Readonly id: string

Defined in

src/network/node.ts:9


ip

Readonly ip: IPv4

Defined in

src/network/node.ts:10

Methods

getNetworkConfig

getNetworkConfig(): Object

Generate a dictionary of arguments that are required for the appropriate Deploy command of an exescript in order to pass the network configuration to the runtime on the provider's end.

Returns

Object

NameType
net{ nodeIp: string ; id: string ; ip: string ; mask: string ; nodes: { [ip: string]: string; } }[]

Defined in

src/network/node.ts:20


getWebsocketUri

getWebsocketUri(port): string

Get the websocket URI corresponding with a specific TCP port on this Node.

Parameters

NameTypeDescription
portnumberTCP port of the service within the runtime

Returns

string

the url

Defined in

src/network/node.ts:36

Was this helpful?