NodeRegistry class

Tracks the nodes registered with the Hub and answers discovery queries.

Constructors

NodeRegistry()

Properties

all → Iterable<RegisteredNode>
All registered nodes.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

byId(NodeId id) → RegisteredNode?
The node with id, or null.
byPeerId(String peerId) → RegisteredNode?
The node served by the peer connection peerId, or null.
list({Map<String, String> filter = const {}}) → List<NodeDescriptor>
Returns descriptors for discovery, applying an optional label filter (each key=value must match the node's labels).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordHeartbeat({required NodeId id, required int seq, required int activeSessions, required DateTime now}) → void
Records an accepted heartbeat.
register({required NodeDescriptor descriptor, required HubPeer peer, required DateTime now}) → RegisteredNode
Registers (or re-registers) a node, replacing any prior record.
remove(NodeId id) → RegisteredNode?
Removes the node with id from the registry, returning the removed record if present.
toString() → String
A string representation of this object.
inherited
updateCapabilities(NodeId id, NodeCapabilities capabilities) → void
Updates a node's advertised capabilities.

Operators

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