Enum ockam_node::NodeMessage [−][src]
pub enum NodeMessage {
StartWorker {
addrs: AddressSet,
senders: SenderPair,
bare: bool,
reply: Sender<NodeReplyResult>,
},
ListWorkers(Sender<NodeReplyResult>),
SetCluster(Address, String, Sender<NodeReplyResult>),
StopWorker(Address, Sender<NodeReplyResult>),
StartProcessor(Address, SenderPair, Sender<NodeReplyResult>),
StopProcessor(Address, Sender<NodeReplyResult>),
StopNode(ShutdownType, Sender<NodeReplyResult>),
AbortNode,
StopAck(Address),
SenderReq(Address, Sender<NodeReplyResult>),
Router(u8, Address, Sender<NodeReplyResult>),
}Expand description
Messages sent from the Node to the Executor
Variants
Start a new worker and store the send handle
Fields of StartWorker
addrs: AddressSetThe set of addresses in use by this worker
senders: SenderPairPair of senders to the worker relay (msgs and ctrl)
bare: boolA bare worker runs no relay state
reply: Sender<NodeReplyResult>Reply channel for command confirmation
ListWorkers(Sender<NodeReplyResult>)Return a list of all worker addresses
Tuple Fields of ListWorkers
SetCluster(Address, String, Sender<NodeReplyResult>)Add an existing address to a cluster
Tuple Fields of SetCluster
StopWorker(Address, Sender<NodeReplyResult>)Stop an existing worker
Tuple Fields of StopWorker
0: Address1: Sender<NodeReplyResult>StartProcessor(Address, SenderPair, Sender<NodeReplyResult>)Start a new processor
Tuple Fields of StartProcessor
StopProcessor(Address, Sender<NodeReplyResult>)Stop an existing processor
Tuple Fields of StopProcessor
0: Address1: Sender<NodeReplyResult>StopNode(ShutdownType, Sender<NodeReplyResult>)Stop the node (and all workers)
Tuple Fields of StopNode
Immediately stop the node runtime
StopAck(Address)Let the router know a particular address has stopped
Tuple Fields of StopAck
0: AddressSenderReq(Address, Sender<NodeReplyResult>)Request the sender for a worker address
Tuple Fields of SenderReq
0: Address1: Sender<NodeReplyResult>Router(u8, Address, Sender<NodeReplyResult>)Register a new router for a route id type
Tuple Fields of Router
Implementations
pub fn start_worker(
addrs: AddressSet,
senders: SenderPair,
bare: bool
) -> (Self, Receiver<NodeReplyResult>)
pub fn start_worker(
addrs: AddressSet,
senders: SenderPair,
bare: bool
) -> (Self, Receiver<NodeReplyResult>)
Create a start worker message
-
senders: message and command senders for the relay -
bare: indicate whether this worker address has a full relay behind it that can respond to shutdown commands. Setting this totruewill disable stop ACK support in the router
pub fn start_processor(
address: Address,
senders: SenderPair
) -> (Self, Receiver<NodeReplyResult>)
pub fn start_processor(
address: Address,
senders: SenderPair
) -> (Self, Receiver<NodeReplyResult>)
Create a start worker message
Create a stop worker message and reply receiver
Create a list worker message and reply receiver
Create a set cluster message and reply receiver
Create a stop worker message and reply receiver
Create a stop node message
Create a sender request message and reply receiver
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for NodeMessage
impl Send for NodeMessage
impl Sync for NodeMessage
impl Unpin for NodeMessage
impl !UnwindSafe for NodeMessage
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more