pub struct SlaMonitor { /* private fields */ }Expand description
SLA monitor for tracking compliance.
Implementations§
Source§impl SlaMonitor
impl SlaMonitor
Sourcepub fn with_default_config() -> Self
pub fn with_default_config() -> Self
Create with default config.
Sourcepub fn record_success(&self, response_time_ms: u64)
pub fn record_success(&self, response_time_ms: u64)
Record a successful request.
Sourcepub fn record_failure(&self)
pub fn record_failure(&self)
Record a failed request.
Sourcepub fn metrics(&self) -> SlaMetrics
pub fn metrics(&self) -> SlaMetrics
Get current metrics.
Sourcepub fn is_sla_met(&self) -> bool
pub fn is_sla_met(&self) -> bool
Check if SLA is met.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SlaMonitor
impl !UnwindSafe for SlaMonitor
impl Freeze for SlaMonitor
impl Send for SlaMonitor
impl Sync for SlaMonitor
impl Unpin for SlaMonitor
impl UnsafeUnpin for SlaMonitor
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> 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