Skip to main content

ServiceDetector

Trait ServiceDetector 

Source
pub trait ServiceDetector:
    Send
    + Sync
    + 'static
    + Send {
    // Required method
    fn detect(
        &self,
        endpoint: &str,
        timeout_millis: u64,
    ) -> impl Future<Output = bool> + Send;
}
Expand description

Detects whether a remote service endpoint is healthy.

Required Methods§

Source

fn detect( &self, endpoint: &str, timeout_millis: u64, ) -> impl Future<Output = bool> + Send

Checks if the remote service at the given endpoint is reachable.

Returns true if the service is back to normal; false otherwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§