Enum routing::Event [] [src]

pub enum Event {
    Request {
        request: Request,
        src: Authority,
        dst: Authority,
    },
    Response {
        response: Response,
        src: Authority,
        dst: Authority,
    },
    NodeAdded(XorNameRoutingTable<XorName>),
    NodeLost(XorNameRoutingTable<XorName>),
    Connected,
    RestartRequired,
    Terminate,
    Tick,
}

An Event raised by a Node or Client via its event sender.

These are sent by routing to the library's user. It allows the user to handle requests and responses, and to react to changes in the network.

Request and Response events from group authorities are only raised once the quorum has been reached, i. e. enough members of the group have sent the same message.

Variants

Received a request message.

Fields

The request message.

The source authority that sent the request.

The destination authority that receives the request.

Received a response message.

Fields

The response message.

The source authority that sent the response.

The destination authority that receives the response.

A new node joined the network and may be a member of group authorities we also belong to.

A node left the network and may have been a member of group authorities we also belong to.

The client has successfully connected to a proxy node on the network.

Disconnected or failed to connect - restart required.

Startup failed - terminate.

This event is sent periodically every time Routing sends the Heartbeat messages.

Trait Implementations

impl Clone for Event
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Event
[src]

impl PartialEq for Event
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Event
[src]

Formats the value using the given formatter.