NodeAgent class

The Node agent runtime: connects to the Hub over WSS, authenticates, registers, maintains a heartbeat with live status, executes Hub-dispatched operations, and reconnects automatically when the connection drops.

The connection lifecycle — dialling, the in-band handshake, registration, the heartbeat timer, exponential backoff, RPC correlation — is omnyhub's omnyhub.NodeRuntime. What lives here is OmnyServer's: what a node advertises about itself, what it reports, and what it will do when asked.

Constructors

NodeAgent(NodeAgentConfig config)
Creates an agent from config.

Properties

config NodeAgentConfig
The agent configuration.
final
hashCode int
The hash code for this object.
no setterinherited
isConnected bool
Whether the agent is currently connected and registered.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state AgentState
The current state.
no setter
states Stream<AgentState>
A stream of state transitions.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportStatus() Future<void>
Pushes a status snapshot to the Hub outside the heartbeat cadence.
sendLogs(List<String> lines, {String source = 'agent'}) → void
Pushes a batch of log lines to the Hub (one-way, best-effort).
start() Future<void>
Starts the agent and resolves once it is first connected and registered.
stop() Future<void>
Stops the agent and closes the connection.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited