pub struct Drain { /* private fields */ }Expand description
The running drain: owns the two worker/forwarder/loop threads. Dropping (or
shutdown) stops the loop; the forwarder exits when the cluster’s
channel-out closes (i.e. when the Cluster is dropped).
Implementations§
Source§impl Drain
impl Drain
Sourcepub fn spawn<S: DrainSink + 'static>(
events: Receiver<ClusterEvent>,
initial_cv: u64,
sink: S,
) -> Drain
pub fn spawn<S: DrainSink + 'static>( events: Receiver<ClusterEvent>, initial_cv: u64, sink: S, ) -> Drain
Spawn the drain over a cluster’s channel-out events, with initial_cv the
replica’s committed watermark at open (the progress frontier) and sink the
delivery target. Returns the handle plus a DrainHandle for the coordinator.
Sourcepub fn handle(&self) -> DrainHandle
pub fn handle(&self) -> DrainHandle
A coordinator-side control handle (cheap clone).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Drain
impl !RefUnwindSafe for Drain
impl Send for Drain
impl Sync for Drain
impl Unpin for Drain
impl UnsafeUnpin for Drain
impl !UnwindSafe for Drain
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