pub struct ClusterSync { /* private fields */ }Expand description
One replica’s view of the cluster: the store, what it applied last, and operations waiting for the store to come back.
Implementations§
Source§impl ClusterSync
impl ClusterSync
pub fn new( store: Box<dyn Store>, local: Box<dyn Local>, node: &str, ) -> ClusterSync
Sourcepub fn tick(&self, heartbeat: bool)
pub fn tick(&self, heartbeat: bool)
One round: send what’s pending, read the document, apply a newer
one. heartbeat also writes this node’s heartbeat.
Sourcepub fn status_json(&self) -> String
pub fn status_json(&self) -> String
{"node":…,"redis":"up"|"down","version":N,"nodes":[…],"pending":N}.
Auto Trait Implementations§
impl !Freeze for ClusterSync
impl !RefUnwindSafe for ClusterSync
impl !UnwindSafe for ClusterSync
impl Send for ClusterSync
impl Sync for ClusterSync
impl Unpin for ClusterSync
impl UnsafeUnpin for ClusterSync
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