Files
orion_greptime_proto/proto/greptime/v1/prom.proto
T
Ruihang Xia a26c40c004 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>
2023-04-24 17:55:35 +08:00

40 lines
845 B
Protocol Buffer

syntax = "proto3";
package greptime.v1;
option java_package = "io.greptime.v1";
option java_outer_classname = "Prometheus";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
import "greptime/v1/common.proto";
// PrometheusGateway behaves absolutely the same as Prometheus HTTP API
service PrometheusGateway {
rpc Handle(PromqlRequest) returns (PromqlResponse);
}
message PromqlRequest {
RequestHeader header = 1;
oneof promql {
PromInstantQuery instant_query = 2;
PromRangeQuery range_query = 3;
}
}
message PromqlResponse {
ResponseHeader header = 1;
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;
string end = 3;
string step = 4;
}