listNodes method

Future<List<NodeDescriptor>> listNodes({
  1. Map<String, String> filter = const {},
})

Lists the nodes visible to this client, with an optional label filter.

Implementation

Future<List<NodeDescriptor>> listNodes({
  Map<String, String> filter = const {},
}) {
  _ensureConnected();
  final completer = Completer<List<NodeDescriptor>>();
  _pendingNodeLists.add(completer);
  _connection!.send(ControlFrame(NodeListRequest(filter: filter)));
  return completer.future;
}