HubActionHandler typedef
HubActionHandler =
Future<Map<String, dynamic> > Function(String action, Map<String, dynamic> payload, RegisteredNode from)
Handles a NodeRequest a node sent to the hub, returning the response payload. Throwing produces a failed NodeResponse.
from is the node that issued the call. Registration is a precondition for
node→hub RPC — the gateway rejects requests from unregistered connections
before reaching this handler — so from is always a live, registered node
and its RegisteredNode.principal can be trusted for authorization.
Implementation
typedef HubActionHandler =
Future<Map<String, dynamic>> Function(
String action,
Map<String, dynamic> payload,
RegisteredNode from,
);