pub struct ReplicationClient { /* private fields */ }Expand description
Replication client running on a follower node. Connects to the leader and receives entries per-shard.
Implementations§
Source§impl ReplicationClient
impl ReplicationClient
Sourcepub fn start(
leader_addr: SocketAddr,
shards: Arc<Shards>,
registry: Arc<ReplicationRegistry>,
key_len: u16,
signal: ShutdownSignal,
) -> DbResult<Self>
pub fn start( leader_addr: SocketAddr, shards: Arc<Shards>, registry: Arc<ReplicationRegistry>, key_len: u16, signal: ShutdownSignal, ) -> DbResult<Self>
Start the replication client.
Spawns one thread per shard to connect to the leader and receive entries.
pub fn start_with_options( leader_addr: SocketAddr, shards: Arc<Shards>, registry: Arc<ReplicationRegistry>, key_len: u16, signal: ShutdownSignal, options: ReplicationClientOptions, ) -> DbResult<Self>
pub fn stop(&self)
Trait Implementations§
Source§impl Drop for ReplicationClient
impl Drop for ReplicationClient
Auto Trait Implementations§
impl !RefUnwindSafe for ReplicationClient
impl !UnwindSafe for ReplicationClient
impl Freeze for ReplicationClient
impl Send for ReplicationClient
impl Sync for ReplicationClient
impl Unpin for ReplicationClient
impl UnsafeUnpin for ReplicationClient
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