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.
11 lines
360 B
11 lines
360 B
use crate::{metric::Metric, types::{DatasourceConfig}}; |
|
|
|
pub mod grafana; |
|
pub mod prometheus; |
|
|
|
pub fn resolve(config: &DatasourceConfig) -> Box<dyn Metric + Sync> { |
|
match config { |
|
DatasourceConfig::Grafana(cfg) => Box::new(grafana::Grafana::new(cfg)), |
|
DatasourceConfig::Prometheus(cfg) => Box::new(prometheus::Prometheus::new(cfg)) |
|
} |
|
}
|
|
|