pub struct MirrorConfig {Show 14 fields
pub enabled: bool,
pub sample_rate: f64,
pub writes_only: bool,
pub queue_size: usize,
pub backend_host: String,
pub backend_port: u16,
pub backend_user: String,
pub backend_password: Option<String>,
pub backend_database: Option<String>,
pub source_host: String,
pub source_port: u16,
pub source_user: String,
pub source_password: Option<String>,
pub source_database: Option<String>,
}Expand description
Traffic-mirror configuration: replay a sampled share of live (simple-query) writes to a secondary backend, asynchronously and off the client hot path.
Fields§
§enabled: bool§sample_rate: f64Fraction of eligible statements to mirror, 0.0..=1.0.
writes_only: boolMirror only write/DDL statements (default). When false, all simple queries are mirrored.
queue_size: usizeBounded queue depth; when full, statements are dropped (and counted) rather than blocking the client path.
backend_host: String§backend_port: u16§backend_user: String§backend_password: Option<String>§backend_database: Option<String>§source_host: StringSource (primary) connection used by POST /api/migration/snapshot to
read existing data when bootstrapping the secondary. Defaults mirror
the listener-side backend; set explicitly for a snapshot.
source_port: u16§source_user: String§source_password: Option<String>§source_database: Option<String>Trait Implementations§
Source§impl Clone for MirrorConfig
impl Clone for MirrorConfig
Source§fn clone(&self) -> MirrorConfig
fn clone(&self) -> MirrorConfig
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 moreSource§impl Debug for MirrorConfig
impl Debug for MirrorConfig
Source§impl Default for MirrorConfig
impl Default for MirrorConfig
Source§impl<'de> Deserialize<'de> for MirrorConfig
impl<'de> Deserialize<'de> for MirrorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MirrorConfig
impl RefUnwindSafe for MirrorConfig
impl Send for MirrorConfig
impl Sync for MirrorConfig
impl Unpin for MirrorConfig
impl UnsafeUnpin for MirrorConfig
impl UnwindSafe for MirrorConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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