pub mod http;
use std::time::Duration;
use async_trait::async_trait;
use crate::config::ProbeTarget;
use crate::error::Result;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ProbeOutcome {
Healthy { status: u16, latency: Duration },
GeoBlocked { status: u16 },
Unreachable { reason: String },
}
impl ProbeOutcome {
pub fn is_healthy(&self) -> bool {
matches!(self, Self::Healthy { .. })
}
}
#[async_trait]
pub trait HealthProbe: Send + Sync {
async fn check(&self, target: &ProbeTarget) -> Result<ProbeOutcome>;
}