feat: replace prom instant query with structure (#29)

* feat: replace prom instant query with structure

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* generate go code

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-04-24 17:55:35 +08:00
committed by GitHub
parent 57e6a032db
commit a26c40c004
2 changed files with 141 additions and 60 deletions
+6 -1
View File
@@ -16,7 +16,7 @@ service PrometheusGateway {
message PromqlRequest {
RequestHeader header = 1;
oneof promql {
string query = 2;
PromInstantQuery instant_query = 2;
PromRangeQuery range_query = 3;
}
}
@@ -26,6 +26,11 @@ message PromqlResponse {
bytes body = 2; // absolutely same format as Prometheus in JSON
}
message PromInstantQuery {
string query = 1;
string time = 2;
}
message PromRangeQuery {
string query = 1;
string start = 2;