pub struct HealthCheckConfig { /* private fields */ }Expand description
Configuration for health check behavior
Implementations§
Source§impl HealthCheckConfig
impl HealthCheckConfig
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set health check interval
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set health check timeout
Sourcepub fn with_strategy(self, strategy: HealthCheckStrategy) -> Self
pub fn with_strategy(self, strategy: HealthCheckStrategy) -> Self
Set health check strategy
Sourcepub fn with_failure_threshold(self, threshold: u32) -> Self
pub fn with_failure_threshold(self, threshold: u32) -> Self
Set failure threshold
Sourcepub fn with_recovery_threshold(self, threshold: u32) -> Self
pub fn with_recovery_threshold(self, threshold: u32) -> Self
Set recovery threshold
Sourcepub fn with_circuit_breaker_integration(self, enabled: bool) -> Self
pub fn with_circuit_breaker_integration(self, enabled: bool) -> Self
Enable circuit breaker integration
Sourcepub fn strategy(&self) -> &HealthCheckStrategy
pub fn strategy(&self) -> &HealthCheckStrategy
Get strategy
Sourcepub fn failure_threshold(&self) -> u32
pub fn failure_threshold(&self) -> u32
Get failure threshold
Sourcepub fn recovery_threshold(&self) -> u32
pub fn recovery_threshold(&self) -> u32
Get recovery threshold
Sourcepub fn circuit_breaker_integration(&self) -> bool
pub fn circuit_breaker_integration(&self) -> bool
Check if circuit breaker integration is enabled
Sourcepub fn validate(&self) -> OllamaResult<()>
pub fn validate(&self) -> OllamaResult<()>
Validate configuration
Trait Implementations§
Source§impl Clone for HealthCheckConfig
impl Clone for HealthCheckConfig
Source§fn clone(&self) -> HealthCheckConfig
fn clone(&self) -> HealthCheckConfig
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 HealthCheckConfig
impl Debug for HealthCheckConfig
Auto Trait Implementations§
impl Freeze for HealthCheckConfig
impl RefUnwindSafe for HealthCheckConfig
impl Send for HealthCheckConfig
impl Sync for HealthCheckConfig
impl Unpin for HealthCheckConfig
impl UnsafeUnpin for HealthCheckConfig
impl UnwindSafe for HealthCheckConfig
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