Skip to main content

Node Connections

Connections can be established between keynodes across the global Polykey network.

NodeConnection objects are stored in a NodeConnectionMap, mapping from the node ID of the target node to the connection to this node. Locking is required on this NodeConnectionMap to ensure consistent creation and usage of existing node connections. This NodeConnectionMap follows the generic ObjectMap flow for creation of a vault, where the resource is the NodeConnection itself:

type ObjectMap = Map<
resource?: Object;
lock: MutexInterface;