pub struct LlmCircuitConfig {
pub failure_threshold: u32,
pub success_threshold: u32,
pub reset_timeout: Duration,
}Expand description
Configuration for the LLM circuit breaker
Fields§
§failure_threshold: u32Number of failures before opening circuit
success_threshold: u32Number of successes in half-open to close circuit
reset_timeout: DurationTime to wait before testing recovery
Implementations§
Source§impl LlmCircuitConfig
impl LlmCircuitConfig
Sourcepub fn conservative() -> Self
pub fn conservative() -> Self
Conservative settings for production LLM providers
Trait Implementations§
Source§impl Clone for LlmCircuitConfig
impl Clone for LlmCircuitConfig
Source§fn clone(&self) -> LlmCircuitConfig
fn clone(&self) -> LlmCircuitConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 LlmCircuitConfig
impl Debug for LlmCircuitConfig
Auto Trait Implementations§
impl Freeze for LlmCircuitConfig
impl RefUnwindSafe for LlmCircuitConfig
impl Send for LlmCircuitConfig
impl Sync for LlmCircuitConfig
impl Unpin for LlmCircuitConfig
impl UnwindSafe for LlmCircuitConfig
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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