pub trait CertificateAlerts: Send + Sync {
// Required method
fn zone_alert_levels(&self) -> BoxFuture<'_, Vec<(String, AlertLevel)>>;
}Expand description
Reads back each zone’s certificate alert level.
A trait rather than the concrete didbot_tls::fleet::CertificateFleet
because that type is generic over its DNS provider, and AppState — one
type, shared by every route — would otherwise carry that parameter
through the whole router for the sake of one field on one response.
The future is boxed for the same reason the trait exists: an alert level
is read from behind a tokio::sync::Mutex the renewal loop also holds,
so answering is async, and an async fn in a trait is not object safe.
Required Methods§
Sourcefn zone_alert_levels(&self) -> BoxFuture<'_, Vec<(String, AlertLevel)>>
fn zone_alert_levels(&self) -> BoxFuture<'_, Vec<(String, AlertLevel)>>
Each zone this deployment serves, and how loud its renewal state currently is, in configuration order.
Implementations on Foreign Types§
Source§impl<D> CertificateAlerts for CertificateFleet<D>where
D: AcmeDnsChallenge + 'static,
The fleet answers for its own zones.
impl<D> CertificateAlerts for CertificateFleet<D>where
D: AcmeDnsChallenge + 'static,
The fleet answers for its own zones.
Written here rather than in didbot-tls because CertificateAlerts is
this crate’s trait: the HTTP surface decides what GET /health says, and
didbot-tls stays a library that knows nothing about a health route.