feat: promql service (#26)
* feat: promql service * feat: promql service * feat: prometheus service, and common.proto, prom.proto * feat: add header in prom request/response * docs: include new proto files in readme
This commit is contained in:
@@ -8,6 +8,8 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
|
||||
|
||||
import "greptime/v1/ddl.proto";
|
||||
import "greptime/v1/column.proto";
|
||||
import "greptime/v1/prom.proto";
|
||||
import "greptime/v1/common.proto";
|
||||
|
||||
service GreptimeDatabase {
|
||||
rpc Handle(GreptimeRequest) returns (GreptimeResponse);
|
||||
@@ -15,33 +17,6 @@ service GreptimeDatabase {
|
||||
rpc HandleRequests(stream GreptimeRequest) returns (GreptimeResponse);
|
||||
}
|
||||
|
||||
message RequestHeader {
|
||||
// The `catalog` that is selected to be used in this request.
|
||||
string catalog = 1;
|
||||
// The `schema` that is selected to be used in this request.
|
||||
string schema = 2;
|
||||
// The `authorization` header, much like http's authorization header.
|
||||
AuthHeader authorization = 3;
|
||||
// The `dbname` for the request
|
||||
string dbname = 4;
|
||||
}
|
||||
|
||||
message AuthHeader {
|
||||
oneof auth_scheme {
|
||||
Basic basic = 1;
|
||||
Token token = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message Basic {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
message Token {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message GreptimeRequest {
|
||||
RequestHeader header = 1;
|
||||
oneof request {
|
||||
@@ -51,8 +26,6 @@ message GreptimeRequest {
|
||||
}
|
||||
}
|
||||
|
||||
message ResponseHeader {}
|
||||
|
||||
message GreptimeResponse {
|
||||
ResponseHeader header = 1;
|
||||
oneof response {
|
||||
@@ -68,13 +41,6 @@ message QueryRequest {
|
||||
}
|
||||
}
|
||||
|
||||
message PromRangeQuery {
|
||||
string query = 1;
|
||||
string start = 2;
|
||||
string end = 3;
|
||||
string step = 4;
|
||||
}
|
||||
|
||||
message InsertRequest {
|
||||
string table_name = 1;
|
||||
|
||||
@@ -89,11 +55,3 @@ message InsertRequest {
|
||||
// The region number of current insert request.
|
||||
uint32 region_number = 5;
|
||||
}
|
||||
|
||||
message AffectedRows {
|
||||
uint32 value = 1;
|
||||
}
|
||||
|
||||
message FlightMetadata {
|
||||
AffectedRows affected_rows = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user