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§
sourcefn node_session_opened(&self, ses: NodeServerSessionInformation)
fn node_session_opened(&self, ses: NodeServerSessionInformation)
A node session has started up
ses
: The NodeServerSessionInformation representing the current state of the node session
sourcefn node_session_disconnected(&self, ses: NodeServerSessionInformation)
fn node_session_disconnected(&self, ses: NodeServerSessionInformation)
A node session has shutdown
ses
: The NodeServerSessionInformation representing the current state of the node session
sourcefn node_session_authenicated(&self, ses: NodeServerSessionInformation)
fn node_session_authenicated(&self, ses: NodeServerSessionInformation)
A node session authenticated
ses
: The NodeServerSessionInformation representing the current state of the node session