From fa47771cff29c699b4ffeba5a5471afbd19e2368 Mon Sep 17 00:00:00 2001 From: prplV Date: Thu, 27 Feb 2025 12:57:46 +0300 Subject: [PATCH] enode monitoring pattern constructor for prom metrics --- crates/integr-structs/src/api.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/integr-structs/src/api.rs b/crates/integr-structs/src/api.rs index a943b6e..3995621 100644 --- a/crates/integr-structs/src/api.rs +++ b/crates/integr-structs/src/api.rs @@ -267,6 +267,13 @@ pub mod v3 { metrics: metrics } } + pub async fn new_zvks(metrics: Vec) -> Self { + Self { + service_name : "zvks".to_owned(), + endpoint_name : "apiforsnmp".to_owned(), + metrics : metrics, + } + } pub fn get_bytes_len(&self) -> usize { let str_metrics = serde_json::to_vec(self).unwrap_or_else( |_| Vec::new()