Alexey Velikiy
3 years ago
5 changed files with 155 additions and 3 deletions
@ -1,3 +1,16 @@ |
|||||||
|
use clap::{Arg, App, SubCommand}; |
||||||
|
|
||||||
fn main() { |
fn main() { |
||||||
println!("welcom from subbeat, work in progress"); |
let matches = App::new("My Super Program") |
||||||
|
.version("0.0.2") |
||||||
|
.about("Timeseries toolkit") |
||||||
|
.arg(Arg::with_name("INPUT") |
||||||
|
.help("Sets the input file to use") |
||||||
|
.required(true) |
||||||
|
.index(1)) |
||||||
|
.get_matches(); |
||||||
|
|
||||||
|
let input = matches.value_of("INPUT").unwrap(); |
||||||
|
|
||||||
|
println!("input file for influxdb {}", input); |
||||||
} |
} |
||||||
|
@ -0,0 +1,29 @@ |
|||||||
|
use std::collections::HashMap; |
||||||
|
|
||||||
|
|
||||||
|
pub type MetricId = String; |
||||||
|
|
||||||
|
struct DatasourceParams { |
||||||
|
db: String, |
||||||
|
q: String, |
||||||
|
epoch: String |
||||||
|
} |
||||||
|
|
||||||
|
struct Datasource { |
||||||
|
url: String, |
||||||
|
dtype: String, |
||||||
|
params: Option<DatasourceParams>, |
||||||
|
data: Option<HashMap<String, String>>, |
||||||
|
datasource_id: Option<String> |
||||||
|
} |
||||||
|
|
||||||
|
struct MetricQuery { |
||||||
|
url: String, |
||||||
|
method: String, |
||||||
|
schema: HashMap<String, String>, |
||||||
|
headers: Option<HashMap<String, String>> |
||||||
|
} |
||||||
|
|
||||||
|
trait Metric { |
||||||
|
fn query(); |
||||||
|
} |
Loading…
Reference in new issue