Proxy: value: handle i64/f64/string

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
Frank Villaro-Dixon 2024-05-24 23:54:11 +02:00
parent 0c96891a46
commit dcce9113d1

View file

@ -19,11 +19,19 @@ struct QSParams {
token: String,
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(untagged)]
enum OtsdbValue {
String(String),
Integer(i64),
Float(f64),
}
#[derive(Debug, Deserialize, Serialize)]
struct OtsdbData {
metric: String,
value: String,
timestamp: f64,
value: OtsdbValue,
timestamp: i64,
tags: HashMap<String, String>,
}