Trait ractor_cluster::node::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);
}
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

Implementors§