diff --git a/src/structs.rs b/src/structs.rs index 3f56f4a..b480f3a 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -1,25 +1,28 @@ // use std::collections::HashMap; use serde::{Serialize, Deserialize}; use serde_json::Value; +use std::borrow::Cow; // use anyhow::Result; // use std::sync::Arc; pub mod v3 { pub use super::*; // to prometheus and nmns - #[derive(Serialize, Deserialize, Debug)] - pub struct MetricOutput { + #[derive(Serialize, Deserialize, Debug, Clone)] + pub struct MetricOutput<'a> { pub id : String, #[serde(rename = "type")] json_type : String, addr : String, pub value : Value, + #[serde(rename = "description")] + pub desc : Option>, } #[derive(Serialize, Deserialize, Debug)] - pub struct PrometheusMetrics { + pub struct PrometheusMetrics<'a> { pub service_name: String, pub endpoint_name: String, - pub metrics: Vec, + pub metrics: Vec>, } } \ No newline at end of file