pub struct HealthCheckCache { /* private fields */ }Expand description
Health check cache for providers
Implementations§
Source§impl HealthCheckCache
impl HealthCheckCache
Sourcepub async fn check_health(
&self,
provider: &Arc<dyn Provider>,
) -> Result<bool, ProviderError>
pub async fn check_health( &self, provider: &Arc<dyn Provider>, ) -> Result<bool, ProviderError>
Check provider health with caching
Sourcepub async fn invalidate(&self, provider_id: &str)
pub async fn invalidate(&self, provider_id: &str)
Invalidate cache for a specific provider
Sourcepub async fn invalidate_all(&self)
pub async fn invalidate_all(&self)
Invalidate all cached results
Sourcepub async fn get_cached(&self, provider_id: &str) -> Option<HealthCheckResult>
pub async fn get_cached(&self, provider_id: &str) -> Option<HealthCheckResult>
Get cached result without performing a new check
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout for health check operations
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HealthCheckCache
impl !RefUnwindSafe for HealthCheckCache
impl Send for HealthCheckCache
impl Sync for HealthCheckCache
impl Unpin for HealthCheckCache
impl !UnwindSafe for HealthCheckCache
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