Browse Source

v0.0.7: clonable prom + code cleanup

main
Alexey Velikiy 3 years ago
parent
commit
ac94f74c40
  1. 2
      Cargo.lock
  2. 2
      Cargo.toml
  3. 5
      src/datasources/prometheus.rs
  4. 3
      src/main.rs

2
Cargo.lock generated

@ -690,7 +690,7 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]] [[package]]
name = "subbeat" name = "subbeat"
version = "0.0.6" version = "0.0.7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",

2
Cargo.toml

@ -1,6 +1,6 @@
[package] [package]
name = "subbeat" name = "subbeat"
version = "0.0.6" version = "0.0.7"
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

5
src/datasources/prometheus.rs

@ -1,5 +1,4 @@
use async_trait::async_trait; use async_trait::async_trait;
use hyper::{Body, Client, Method, Request, StatusCode};
use serde_derive::{Deserialize, Serialize}; use serde_derive::{Deserialize, Serialize};
use serde_json::Value; use serde_json::Value;
@ -12,9 +11,7 @@ use crate::{
use serde_qs as qs; use serde_qs as qs;
use bytes::Buf as _; #[derive(Clone)]
use std::io::Read;
pub struct Prometheus { pub struct Prometheus {
url: String, url: String,
query: String, query: String,

3
src/main.rs

@ -1,6 +1,5 @@
use subbeat::{ use subbeat::{
datasources::{grafana, resolve}, datasources::resolve,
metric::Metric,
}; };
mod cli; mod cli;

Loading…
Cancel
Save