Browse Source

derive cloen for configs

main
Alexey Velikiy 3 years ago
parent
commit
f981979ddc
  1. 4
      src/types.rs

4
src/types.rs

@ -4,11 +4,13 @@ use anyhow;
pub type Result<T> = anyhow::Result<T>; pub type Result<T> = anyhow::Result<T>;
#[derive(Clone)]
pub struct PrometheusConfig { pub struct PrometheusConfig {
pub url: String, pub url: String,
pub query: String, pub query: String,
} }
#[derive(Clone)]
pub struct InfluxConfig { pub struct InfluxConfig {
pub url: String, pub url: String,
pub org_id: String, pub org_id: String,
@ -16,6 +18,7 @@ pub struct InfluxConfig {
pub query: String, pub query: String,
} }
#[derive(Clone)]
pub struct GrafanaConfig { pub struct GrafanaConfig {
pub url: String, pub url: String,
pub api_key: String, pub api_key: String,
@ -23,6 +26,7 @@ pub struct GrafanaConfig {
pub query: String, pub query: String,
} }
#[derive(Clone)]
pub enum DatasourceConfig { pub enum DatasourceConfig {
Grafana(GrafanaConfig), Grafana(GrafanaConfig),
Prometheus(PrometheusConfig), Prometheus(PrometheusConfig),

Loading…
Cancel
Save