From 5bda871e00d608bc39450542d0701b40e311ab3a Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Fri, 26 Nov 2021 11:52:45 -0700 Subject: [PATCH] adds defaults to healthcheck severity (#857) * adds defaults to healthcheck severity * qualify --- appmgr/src/status/health_check.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appmgr/src/status/health_check.rs b/appmgr/src/status/health_check.rs index 0dbe59c68..6351e9379 100644 --- a/appmgr/src/status/health_check.rs +++ b/appmgr/src/status/health_check.rs @@ -74,12 +74,18 @@ pub enum HealthCheckSeverity { Critical, } +impl Default for HealthCheckSeverity { + fn default() -> Self { + HealthCheckSeverity::Warning + } +} #[derive(Clone, Debug, Deserialize, Serialize)] pub struct HealthCheck { pub name: String, pub description: String, #[serde(flatten)] implementation: ActionImplementation, + #[serde(default)] pub severity: HealthCheckSeverity, pub timeout: Option, }