nodes method
Returns the current node inventory — every node on the tailnet this node is aware of, whether online right now or not.
Separate from status so apps can poll lightweight node state without re-pulling the full node list on every refresh. For push-style updates, see onNodeChanges.
Implementation
@override
Future<List<TailscaleNode>> nodes() async {
final nodes = <TailscaleNode>[];
var index = 0;
for (final ip in _peerPortIndex.keys) {
nodes.add(
TailscaleNode(
publicKey: 'loopback-key-$index',
stableNodeId: 'loopback-$ip',
hostName: 'loopback-peer-$index',
dnsName: 'loopback-peer-$index.dune.test.',
os: 'test',
tailscaleIPs: [ip],
online: _running,
active: _running,
rxBytes: 0,
txBytes: 0,
),
);
index += 1;
}
return nodes;
}