Skip to main content

Module node

Module node 

Source
Expand description

The transport-agnostic, cooperative node state machine.

Node owns protocol state, while callers own sockets, streams, storage, clocks, and executors. Each input produces at most one explicit action.

Structs§

ControlSession
A session owns its stream and has no reference to a Node.
DerpSession
A DERP session has the same ownership boundary as a control session.
Endpoint
A DNS name and TCP port. DNS resolution belongs to the transport adapter.
Node
PersistState
Versioned caller-owned persistent state.
SecretBuffer
An owned bounded value which clears its initialized bytes on drop and never exposes them through Debug.

Enums§

ControlCommand
Work for the caller’s control-plane task.
ControlEvent
Control events contain decoded protocol-level data, never stream handles.
DerpCommand
Work for the caller’s DERP task. Payload storage is bounded and zeroized.
DerpEvent
DERP framing is consumed by the session task; the node only sees peers.
NodeAction
NodeError
NodeStatus
RegistrationState

Constants§

MAX_ACTION_PACKET
Largest packet carried by a node action.
MAX_CONTROL_BODY
Largest bounded control request body.

Traits§

Transport
Static-dispatch adapter for control and DERP connections.