NodeDescriptor class

A node's public description as registered with the Hub and returned by discovery (nodes list). Combines identity, platform, operator labels and advertised capabilities.

Annotations
  • @immutable

Constructors

NodeDescriptor({required NodeId id, required String displayName, required PlatformInfo platform, required bool online, OmnyUid? uid, Map<String, String> labels = const {}, NodeCapabilities? capabilities})
Creates a node descriptor.
const

Properties

capabilities NodeCapabilities?
The node's advertised capabilities, if it has registered them.
final
displayName String
A human-friendly display name.
final
hashCode int
The hash code for this object.
no setterinherited
id NodeId
The node's stable identity.
final
labels Map<String, String>
Free-form operator labels (e.g. {env: prod, region: eu}), used for discovery filtering and authorization policy.
final
online bool
Whether the node currently holds a live connection to the Hub.
final
platform PlatformInfo
The node's platform (OS, arch, agent version, hostname).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uid OmnyUid?
The node's deterministic global UID (cryptographic key + hardware/platform fingerprint), or null if the node did not report one.
final

Methods

copyWith({bool? online, NodeCapabilities? capabilities, Map<String, String>? labels}) NodeDescriptor
Returns a copy with selected fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) NodeDescriptor
Decodes from a JSON map.