Alexey Velikiy 3 years ago
parent
commit
63e4b6f158
  1. 2
      src/datasources/grafana.rs
  2. 2
      src/datasources/grafana/prometheus.rs
  3. 2
      src/datasources/influx.rs
  4. 2
      src/datasources/prometheus.rs
  5. 2
      src/metric.rs

2
src/datasources/grafana.rs

@ -118,7 +118,7 @@ impl Metric for Grafana {
Ok(r)
}
fn boxed_clone(&self) -> Box<dyn Metric + Sync> {
fn boxed_clone(&self) -> Box<dyn Metric + Sync + Send> {
return Box::new(self.clone());
}
}

2
src/datasources/grafana/prometheus.rs

@ -63,7 +63,7 @@ impl Metric for Prometheus {
return prometheus::parse_result(value);
}
fn boxed_clone(&self) -> Box<dyn Metric + Sync> {
fn boxed_clone(&self) -> Box<dyn Metric + Sync + Send> {
return Box::new(self.clone());
}
}

2
src/datasources/influx.rs

@ -90,7 +90,7 @@ impl Metric for Influx {
return parse_result(value);
}
fn boxed_clone(&self) -> Box<dyn Metric + Sync> {
fn boxed_clone(&self) -> Box<dyn Metric + Sync + Send> {
return Box::new(self.clone());
}
}

2
src/datasources/prometheus.rs

@ -98,7 +98,7 @@ impl Metric for Prometheus {
return parse_result(value);
}
fn boxed_clone(&self) -> Box<dyn Metric + Sync> {
fn boxed_clone(&self) -> Box<dyn Metric + Sync + Send> {
return Box::new(self.clone());
}
}

2
src/metric.rs

@ -59,7 +59,7 @@ impl Default for MetricResult {
#[async_trait]
pub trait Metric {
fn boxed_clone(&self) -> Box<dyn Metric + Sync>;
fn boxed_clone(&self) -> Box<dyn Metric + Sync + Send>;
// (to - from) / step < 10000
async fn query_chunk(&self, from: u64, to: u64, step: u64) -> types::Result<MetricResult>;

Loading…
Cancel
Save