should be called to update the values of selfConf.transport
when a new server is added.
Should be called from Transport layer, not directly.
An object with keys type
, port
and event
. Similar to selfConf.transport
Similar to joinNode(). The only difference is that it will not log a warning
if a node already exists.
Note that a middleware or bootstrap function should call a method with the
same name in serviceRepository
layer. This method should not be called directly.
netId of a node
1 if ok, -1 if fail.
a Duplicate function to joinNode. The only difference is logging and the fact that this one takes an array of nodes
a list of nodes
Will cause the system to forget all of the nodes. Should not be used only in test environemts
will return the internal selfConf variable
node's selfConf
Will return the internal systemConf variable
node's systemConf
should be called to inform that a new node has joined the system.
This will log the results automatically.
Note that a middleware or bootstrap function should call a method with the
same name in serviceRepository
layer. This method should not be called directly.
netId of a node
1 if ok, -1 if fail.
should be called to inform that a node has left the system.
This will log the results automatically.
Note that a middleware or bootstrap function should call a method with the
same name in serviceRepository
layer. This method should not be called directly.
netId of a node
1 if ok, -1 if fail.
Will remove a server from the confg object
port of the server
Status of the operation
will override the configurations passed to XYZ constructor inside internal variable.
Note that the xyz.js
constructor should call this and there is no other use case for it.
Object with the same format of xyz's constructor selfConf
Manual command line arguments. When this has a value, it will be used insteat of process.argv[1]
Overrides the configuration's systemConf
inside internal variables
systemConf with the same format like xyz
's constructor
Generated using TypeDoc
This module is available throughout xyz using
xyz.CONFIG
. It sores important information about the node and the system. Most of the properties are read-only and should be updated ONLY using defined methods.Configuration