pub struct HaConfigBuilder { /* private fields */ }Expand description
高可用配置 builder(v7.3.0)
Implementations§
Source§impl HaConfigBuilder
impl HaConfigBuilder
Sourcepub fn failover_enabled(self, enabled: bool) -> Self
pub fn failover_enabled(self, enabled: bool) -> Self
设置故障转移启用
Sourcepub fn failover(self, config: FailoverConfig) -> Self
pub fn failover(self, config: FailoverConfig) -> Self
设置故障转移配置
Sourcepub fn rate_limit_threshold(self, threshold: f64) -> Self
pub fn rate_limit_threshold(self, threshold: f64) -> Self
设置限流阈值
Sourcepub fn rate_limit_queue_timeout_ms(self, ms: u64) -> Self
pub fn rate_limit_queue_timeout_ms(self, ms: u64) -> Self
设置限流排队超时(毫秒)
Sourcepub fn circuit_breaker_error_threshold(self, threshold: f64) -> Self
pub fn circuit_breaker_error_threshold(self, threshold: f64) -> Self
设置熔断错误率阈值
Sourcepub fn circuit_breaker_half_open_probes(self, probes: u32) -> Self
pub fn circuit_breaker_half_open_probes(self, probes: u32) -> Self
设置半开探测请求数
Sourcepub fn trace_sample_rate(self, rate: f64) -> Self
pub fn trace_sample_rate(self, rate: f64) -> Self
设置追踪采样率
Sourcepub fn trace_otlp_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn trace_otlp_endpoint(self, endpoint: impl Into<String>) -> Self
设置 OTLP 导出端点
Trait Implementations§
Source§impl Clone for HaConfigBuilder
impl Clone for HaConfigBuilder
Source§fn clone(&self) -> HaConfigBuilder
fn clone(&self) -> HaConfigBuilder
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 HaConfigBuilder
impl Debug for HaConfigBuilder
Source§impl Default for HaConfigBuilder
impl Default for HaConfigBuilder
Source§fn default() -> HaConfigBuilder
fn default() -> HaConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HaConfigBuilder
impl RefUnwindSafe for HaConfigBuilder
impl Send for HaConfigBuilder
impl Sync for HaConfigBuilder
impl Unpin for HaConfigBuilder
impl UnsafeUnpin for HaConfigBuilder
impl UnwindSafe for HaConfigBuilder
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> 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 more