pub enum RaftMessage {
Propose {
data: Vec<u8>,
response: Sender<Result<Vec<u8>>>,
},
Step {
message: Message,
},
Tick,
Query {
data: Vec<u8>,
response: Sender<Result<Vec<u8>>>,
},
Shutdown,
}Expand description
Messages that can be sent to the Raft controller
Variants§
Propose
Propose a new entry
Step
Process a Raft message from peer
Tick
Tick the Raft state machine
Query
Query current state (read-only)
Shutdown
Shutdown the Raft controller
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RaftMessage
impl !RefUnwindSafe for RaftMessage
impl Send for RaftMessage
impl Sync for RaftMessage
impl Unpin for RaftMessage
impl !UnwindSafe for RaftMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more