pub struct ClusterSync { /* private fields */ }Available on non-WebAssembly only.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more