Trait NodeEventSubscription

Source
pub trait NodeEventSubscription: Send + 'static {
    // Required methods
    fn node_session_opened(&self, ses: NodeServerSessionInformation);
    fn node_session_disconnected(&self, ses: NodeServerSessionInformation);
    fn node_session_authenicated(&self, ses: NodeServerSessionInformation);

    // Provided method
    fn node_session_ready(&self, ses: NodeServerSessionInformation) { ... }
}
Expand description

Trait which is utilized to receive Node events (node session startup, shutdown, etc).

Node events can be used to try and reconnect node sessions or handle custom shutdown logic as needed. They methods are synchronous because ideally they’d be message sends and we don’t want to risk blocking the NodeServer’s logic

Required Methods§

Source

fn node_session_opened(&self, ses: NodeServerSessionInformation)

A node session has started up

Source

fn node_session_disconnected(&self, ses: NodeServerSessionInformation)

A node session has shutdown

Source

fn node_session_authenicated(&self, ses: NodeServerSessionInformation)

A node session authenticated

Provided Methods§

Source

fn node_session_ready(&self, ses: NodeServerSessionInformation)

A node session is ready

Implementors§