pub struct ReplicationConfig {
pub role: ReplicationRole,
pub poll_interval_ms: u64,
pub max_batch_size: usize,
pub region: String,
pub quorum: QuorumConfig,
}Expand description
Configuration for replication.
Fields§
§role: ReplicationRole§poll_interval_ms: u64How often replica polls for new WAL records (milliseconds).
max_batch_size: usizeMaximum batch size for WAL record transfer.
region: StringRegion identifier for this instance (Phase 2.6 multi-region).
Used by the quorum coordinator to spread write acks across
fault domains: QuorumConfig::required_regions forces a commit
to wait until at least one replica in each listed region has
acked. Defaults to "local" for single-region deployments.
quorum: QuorumConfigQuorum configuration (Phase 2.6 multi-region).
Implementations§
Source§impl ReplicationConfig
impl ReplicationConfig
pub fn standalone() -> Self
pub fn primary() -> Self
pub fn replica(primary_addr: impl Into<String>) -> Self
Sourcepub fn with_quorum(self, quorum: QuorumConfig) -> Self
pub fn with_quorum(self, quorum: QuorumConfig) -> Self
Attach a quorum configuration (fluent setter).
Sourcepub fn with_region(self, region: impl Into<String>) -> Self
pub fn with_region(self, region: impl Into<String>) -> Self
Set the region identifier (fluent setter).
Trait Implementations§
Source§impl Clone for ReplicationConfig
impl Clone for ReplicationConfig
Source§fn clone(&self) -> ReplicationConfig
fn clone(&self) -> ReplicationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReplicationConfig
impl RefUnwindSafe for ReplicationConfig
impl Send for ReplicationConfig
impl Sync for ReplicationConfig
impl Unpin for ReplicationConfig
impl UnsafeUnpin for ReplicationConfig
impl UnwindSafe for ReplicationConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request