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.

22 lines
522 B

use subbeat::datasources::prometheus::Prometheus;
3 years ago
#[derive(Clone)]
pub struct MetricService {
3 years ago
url: String,
query: String,
}
impl MetricService {
pub fn new(url: &str, query: &str) -> MetricService {
MetricService {
3 years ago
url: url.to_string(),
3 years ago
query: query.to_string(),
}
}
3 years ago
// TODO: make prom as field, but Prometheus should be clonable first
3 years ago
pub fn get_prom(&self) -> Prometheus {
Prometheus::new(&self.url.to_string(), &self.query.to_string())
}
}