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
StartWorker
Fields
addrs: AddressSet
The set of addresses in use by this worker
bare: bool
A bare worker runs no relay state
reply: Sender<NodeReplyResult>
Reply channel for command confirmation
Start a new worker and store the send handle
ListWorkers(Sender<NodeReplyResult>)
Tuple Fields
Return a list of all worker addresses
SetCluster(Address, String, Sender<NodeReplyResult>)
Add an existing address to a cluster
StopWorker(Address, Sender<NodeReplyResult>)
Stop an existing worker
StartProcessor(Address, SenderPair, Sender<NodeReplyResult>)
Start a new processor
StopProcessor(Address, Sender<NodeReplyResult>)
Stop an existing processor
StopNode(ShutdownType, Sender<NodeReplyResult>)
Stop the node (and all workers)
AbortNode
Immediately stop the node runtime
StopAck(Address)
Tuple Fields
0: Address
Let the router know a particular address has stopped
SenderReq(Address, Sender<NodeReplyResult>)
Request the sender for a worker address
Router(u8, Address, Sender<NodeReplyResult>)
Register a new router for a route id type
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 totrue
will 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