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]]
name = "subbeat"
version = "0.0.6"
version = "0.0.7"
dependencies = [
"anyhow",
"async-trait",

2
Cargo.toml

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

5
src/datasources/prometheus.rs

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

3
src/main.rs

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

Loading…
Cancel
Save