Trait raft_consensus::consensus::ConsensusHandler
[−]
[src]
pub trait ConsensusHandler: Debug { fn send_peer_message(&mut self, id: ServerId, message: PeerMessage); fn send_client_response(&mut self, id: ClientId, message: ClientResponse); fn set_timeout(&mut self, timeout: ConsensusTimeout); fn clear_timeout(&mut self, timeout: ConsensusTimeout); fn done(&mut self) { ... } }
Handler for actions returned from consensus
Required Methods
fn send_peer_message(&mut self, id: ServerId, message: PeerMessage)
fn send_client_response(&mut self, id: ClientId, message: ClientResponse)
fn set_timeout(&mut self, timeout: ConsensusTimeout)
fn clear_timeout(&mut self, timeout: ConsensusTimeout)
Provided Methods
fn done(&mut self)
Called when the particular event has been fully processed. Useful for doing actions in batches
Implementors
impl ConsensusHandler for CollectHandler