pub enum PrimaryMessage {
StreamStart {
start_sequence: u64,
genesis_entry: Vec<u8>,
},
NeedSnapshot,
HashMismatch,
SnapshotBegin {
snapshot_len: u64,
snap_sequence: u64,
snap_chain_hash: [u8; 32],
},
SnapshotChunk(Vec<u8>),
SnapshotEnd {
crc32c: u32,
},
Heartbeat {
sequence: u64,
},
}Expand description
Messages from primary to replica.
Variants§
StreamStart
Fields
NeedSnapshot
HashMismatch
SnapshotBegin
Start of a snapshot transfer. Sent after NeedSnapshot.
Fields
SnapshotChunk(Vec<u8>)
A chunk of snapshot data. Sent repeatedly after SnapshotBegin.
SnapshotEnd
End of snapshot transfer. Contains CRC32C of the entire snapshot file.
Heartbeat
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrimaryMessage
impl RefUnwindSafe for PrimaryMessage
impl Send for PrimaryMessage
impl Sync for PrimaryMessage
impl Unpin for PrimaryMessage
impl UnsafeUnpin for PrimaryMessage
impl UnwindSafe for PrimaryMessage
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