exred_node_grpc_twin v0.1.6 Exred.Node.GrpcTwin
Represents an external node that connects to Exred via gRPC. It needs the gRPC Daemon Node running in the flow.
External nodes can connect to Exred using the gRPC protocol. The external client needs to implement the exredrpc protocol (see the exredrpc.proto file under the priv dir).
The protocol is a simple bi-directional streaming protocol. Both the internal Exred node (this node) and the external node needs to connect to the broker using a bond_id. Once the two sides are bonded the Broker will start forwarding messages between them.
The external node just needs to make the RPC call and pass in the bond_id in the context as metadata. The gRPC server on the Elixir side will initiate the bonding for the external node.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
daemon_child_specs/1 needs to return a list of child specs. These child processes will be started under the DaemonNodeSupervisor
fire/1 is called when the user clicks on the play button on a node in the UI (and with that triggers a ‘fire’ event). It should return a new_state
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
daemon_child_specs/1 needs to return a list of child specs. These child processes will be started under the DaemonNodeSupervisor.
Callback implementation for Exred.NodePrototype.daemon_child_specs/1
.
fire/1 is called when the user clicks on the play button on a node in the UI (and with that triggers a ‘fire’ event). It should return a new_state.
Since this has access to the node’s state it can be used to implement user triggered actions like logging the state, sending messages from the node or creating debug events that are displayed in the debug tab in the UI.
For an example of how to use it see the Trigger node.
Callback implementation for Exred.NodePrototype.fire/1
.