From 593bf774e0890da6fb85cfc21c01d6329ebf41c2 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Mon, 25 Oct 2021 04:09:55 +0300 Subject: [PATCH] prom continue --- src/datasources.rs | 1 + src/datasources/prometheus.rs | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/datasources/prometheus.rs diff --git a/src/datasources.rs b/src/datasources.rs index 85443df..db2dbb4 100644 --- a/src/datasources.rs +++ b/src/datasources.rs @@ -1 +1,2 @@ pub mod grafana; +pub mod prometheus; diff --git a/src/datasources/prometheus.rs b/src/datasources/prometheus.rs new file mode 100644 index 0000000..904d65c --- /dev/null +++ b/src/datasources/prometheus.rs @@ -0,0 +1,26 @@ +use std::ptr::NonNull; + +use async_trait::async_trait; + +use crate::{ + metric::{Metric, MetricResult}, + types, +}; + + +struct Prometheus { + +} + +impl Prometheus { + pub fn new() -> Prometheus { + Prometheus{} + } +} + +#[async_trait] +impl Metric for Prometheus { + async fn query_chunk(&self, from: u64, to: u64, step: u64) -> types::Result { + return None; + } +} \ No newline at end of file