Hastic standalone
https://hastic.io
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
449 B
20 lines
449 B
use subbeat::datasources::prometheus::Prometheus; |
|
|
|
#[derive(Clone)] |
|
pub struct MetricService { |
|
url: String, |
|
query: String, |
|
} |
|
|
|
impl MetricService { |
|
pub fn new(url: &str, query: &str) -> MetricService { |
|
MetricService { |
|
url: url.to_string(), |
|
query: query.to_string(), |
|
} |
|
} |
|
|
|
pub fn get_prom(&self) -> Prometheus { |
|
Prometheus::new(&self.url.to_string(), &self.query.to_string()) |
|
} |
|
}
|
|
|