pub enum NodeMessage {
Show 13 variants StartWorker { addrs: Vec<Address>, senders: SenderPair, detached: bool, mailbox_count: Arc<AtomicUsize>, reply: SmallSender<NodeReplyResult>, }, ListWorkers(SmallSender<NodeReplyResult>), SetCluster(AddressStringSmallSender<NodeReplyResult>), StopWorker(AddressboolSmallSender<NodeReplyResult>), StartProcessor(Address, SenderPair, SmallSender<NodeReplyResult>), StopProcessor(AddressSmallSender<NodeReplyResult>), StopNode(ShutdownTypeSmallSender<NodeReplyResult>), AbortNode, StopAck(Address), SenderReq(AddressSmallSender<NodeReplyResult>), Router(TransportTypeAddressSmallSender<NodeReplyResult>), SetReady(Address), CheckReady(AddressSmallSender<NodeReplyResult>),
}
Expand description

Messages sent from the Node to the Executor

Variants§

§

StartWorker

Fields

§addrs: Vec<Address>

The set of addresses in use by this worker

§senders: SenderPair

Pair of senders to the worker relay (msgs and ctrl)

§detached: bool

A detached context/ “worker” runs no relay state

§mailbox_count: Arc<AtomicUsize>

A mechanism to read channel fill-state for a worker

§reply: SmallSender<NodeReplyResult>

Reply channel for command confirmation

Start a new worker and store the send handle

§

ListWorkers(SmallSender<NodeReplyResult>)

Return a list of all worker addresses

§

SetCluster(AddressStringSmallSender<NodeReplyResult>)

Add an existing address to a cluster

§

StopWorker(AddressboolSmallSender<NodeReplyResult>)

Stop an existing worker

§

StartProcessor(Address, SenderPair, SmallSender<NodeReplyResult>)

Start a new processor

§

StopProcessor(AddressSmallSender<NodeReplyResult>)

Stop an existing processor

§

StopNode(ShutdownTypeSmallSender<NodeReplyResult>)

Stop the node (and all workers)

§

AbortNode

Immediately stop the node runtime

§

StopAck(Address)

Let the router know a particular address has stopped

§

SenderReq(AddressSmallSender<NodeReplyResult>)

Request the sender for a worker address

§

Router(TransportTypeAddressSmallSender<NodeReplyResult>)

Register a new router for a route id type

§

SetReady(Address)

Message the router to set an address as “ready”

§

CheckReady(AddressSmallSender<NodeReplyResult>)

Check whether an address has been marked as “ready”

Implementations§

source§

impl NodeMessage

source

pub fn start_worker(
    addrs: Vec<Address>,
    senders: SenderPair,
    detached: bool,
    mailbox_count: Arc<AtomicUsize>
) -> (Self, SmallReceiver<NodeReplyResult>)

Create a start worker message

  • senders: message and command senders for the relay

  • detached: indicate whether this worker address has a full relay behind it that can respond to shutdown commands. Setting this to true will disable stop ACK support in the router

source

pub fn start_processor(
    address: Address,
    senders: SenderPair
) -> (Self, SmallReceiver<NodeReplyResult>)

Create a start worker message

source

pub fn stop_processor(
    address: Address
) -> (Self, SmallReceiver<NodeReplyResult>)

Create a stop worker message and reply receiver

source

pub fn list_workers() -> (Self, SmallReceiver<NodeReplyResult>)

Create a list worker message and reply receiver

source

pub fn set_cluster(
    addr: Address,
    label: String
) -> (Self, SmallReceiver<NodeReplyResult>)

Create a set cluster message and reply receiver

source

pub fn stop_worker(
    address: Address,
    detached: bool
) -> (Self, SmallReceiver<NodeReplyResult>)

Create a stop worker message and reply receiver

source

pub fn stop_node(tt: ShutdownType) -> (Self, SmallReceiver<NodeReplyResult>)

Create a stop node message

source

pub fn sender_request(route: Address) -> (Self, SmallReceiver<NodeReplyResult>)

Create a sender request message and reply receiver

source

pub fn set_ready(addr: Address) -> Self

Create a SetReady message and reply receiver

source

pub fn get_ready(addr: Address) -> (Self, SmallReceiver<NodeReplyResult>)

Create a GetReady message and reply receiver

Trait Implementations§

source§

impl Debug for NodeMessage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for NodeMessage

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere
    T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more