Skip to main content

greentic_ext_runtime/
health.rs

1#[derive(Debug, Clone, PartialEq, Eq)]
2pub enum ExtensionHealth {
3    Healthy,
4    Degraded(HealthReason),
5}
6
7#[derive(Debug, Clone, PartialEq, Eq)]
8pub enum HealthReason {
9    MissingRequiredCap(String),
10    SignatureInvalid,
11    LoadFailed(String),
12    CycleDetected,
13}
14
15impl ExtensionHealth {
16    #[must_use]
17    pub const fn is_healthy(&self) -> bool {
18        matches!(self, Self::Healthy)
19    }
20}