diff --git a/go/greptime/v1/database.pb.go b/go/greptime/v1/database.pb.go index 1924a06..2d716d1 100644 --- a/go/greptime/v1/database.pb.go +++ b/go/greptime/v1/database.pb.go @@ -861,14 +861,14 @@ var File_greptime_v1_database_proto protoreflect.FileDescriptor var file_greptime_v1_database_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x16, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x03, 0x0a, 0x0f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, @@ -1063,11 +1063,11 @@ func file_greptime_v1_database_proto_init() { if File_greptime_v1_database_proto != nil { return } - file_greptime_v1_ddl_proto_init() file_greptime_v1_column_proto_init() - file_greptime_v1_row_proto_init() - file_greptime_v1_prom_proto_init() file_greptime_v1_common_proto_init() + file_greptime_v1_ddl_proto_init() + file_greptime_v1_prom_proto_init() + file_greptime_v1_row_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GreptimeRequest); i { diff --git a/go/greptime/v1/meta/ddl.pb.go b/go/greptime/v1/meta/ddl.pb.go index e1ca142..91f574e 100644 --- a/go/greptime/v1/meta/ddl.pb.go +++ b/go/greptime/v1/meta/ddl.pb.go @@ -1222,14 +1222,14 @@ var File_greptime_v1_meta_ddl_proto protoreflect.FileDescriptor var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x18, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x12, + 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x48, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, diff --git a/go/greptime/v1/meta/route.pb.go b/go/greptime/v1/meta/route.pb.go index 123879f..624814d 100644 --- a/go/greptime/v1/meta/route.pb.go +++ b/go/greptime/v1/meta/route.pb.go @@ -409,9 +409,9 @@ var file_greptime_v1_meta_route_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, - 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, + 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, diff --git a/go/greptime/v1/wal.pb.go b/go/greptime/v1/wal.pb.go index a44093e..483fdbc 100644 --- a/go/greptime/v1/wal.pb.go +++ b/go/greptime/v1/wal.pb.go @@ -420,9 +420,9 @@ var File_greptime_v1_wal_proto protoreflect.FileDescriptor var file_greptime_v1_wal_proto_rawDesc = []byte{ 0x0a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, @@ -516,8 +516,8 @@ func file_greptime_v1_wal_proto_init() { if File_greptime_v1_wal_proto != nil { return } - file_greptime_v1_row_proto_init() file_greptime_v1_common_proto_init() + file_greptime_v1_row_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_wal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteHint); i { diff --git a/proto/greptime/v1/column.proto b/proto/greptime/v1/column.proto index 6b754ae..2968c67 100644 --- a/proto/greptime/v1/column.proto +++ b/proto/greptime/v1/column.proto @@ -16,12 +16,12 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "Columns"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - import "greptime/v1/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Columns"; +option java_package = "io.greptime.v1"; + message Column { string column_name = 1; SemanticType semantic_type = 2; diff --git a/proto/greptime/v1/common.proto b/proto/greptime/v1/common.proto index c20b72c..0a22cd7 100644 --- a/proto/greptime/v1/common.proto +++ b/proto/greptime/v1/common.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "Common"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Common"; +option java_package = "io.greptime.v1"; message QueryContext { string current_catalog = 1; @@ -61,7 +61,9 @@ message RequestHeader { string timezone = 6; } -message ResponseHeader { Status status = 1; } +message ResponseHeader { + Status status = 1; +} message Status { // Corresponding to the `StatusCode` definition of GreptimeDB @@ -81,7 +83,9 @@ message Basic { string password = 2; } -message Token { string token = 1; } +message Token { + string token = 1; +} message TableName { string catalog_name = 1; @@ -89,11 +93,17 @@ message TableName { string table_name = 3; } -message AffectedRows { uint32 value = 1; } +message AffectedRows { + uint32 value = 1; +} -message Metrics { bytes metrics = 1; } +message Metrics { + bytes metrics = 1; +} -message ExpireAfter { int64 value = 1; } +message ExpireAfter { + int64 value = 1; +} message FlightMetadata { AffectedRows affected_rows = 1; diff --git a/proto/greptime/v1/database.proto b/proto/greptime/v1/database.proto index 881260b..41e1b73 100644 --- a/proto/greptime/v1/database.proto +++ b/proto/greptime/v1/database.proto @@ -16,15 +16,15 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "Database"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - -import "greptime/v1/ddl.proto"; import "greptime/v1/column.proto"; -import "greptime/v1/row.proto"; -import "greptime/v1/prom.proto"; import "greptime/v1/common.proto"; +import "greptime/v1/ddl.proto"; +import "greptime/v1/prom.proto"; +import "greptime/v1/row.proto"; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Database"; +option java_package = "io.greptime.v1"; service GreptimeDatabase { rpc Handle(GreptimeRequest) returns (GreptimeResponse); @@ -46,7 +46,9 @@ message GreptimeRequest { message GreptimeResponse { ResponseHeader header = 1; - oneof response { AffectedRows affected_rows = 2; } + oneof response { + AffectedRows affected_rows = 2; + } } message QueryRequest { @@ -65,7 +67,9 @@ message InsertIntoPlan { bytes logical_plan = 2; } -message InsertRequests { repeated InsertRequest inserts = 1; } +message InsertRequests { + repeated InsertRequest inserts = 1; +} message InsertRequest { string table_name = 1; @@ -79,7 +83,9 @@ message InsertRequest { uint32 row_count = 4; } -message DeleteRequests { repeated DeleteRequest deletes = 1; } +message DeleteRequests { + repeated DeleteRequest deletes = 1; +} message DeleteRequest { // The table name to delete from. Catalog name and schema name are in the @@ -93,7 +99,9 @@ message DeleteRequest { uint32 row_count = 4; } -message RowInsertRequests { repeated RowInsertRequest inserts = 1; } +message RowInsertRequests { + repeated RowInsertRequest inserts = 1; +} message RowInsertRequest { string table_name = 1; @@ -102,7 +110,9 @@ message RowInsertRequest { Rows rows = 2; } -message RowDeleteRequests { repeated RowDeleteRequest deletes = 1; } +message RowDeleteRequests { + repeated RowDeleteRequest deletes = 1; +} message RowDeleteRequest { // The table name to delete from. Catalog name and schema name are in the diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 1cb6f30..bfe064e 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -16,12 +16,12 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "Ddl"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - import "greptime/v1/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Ddl"; +option java_package = "io.greptime.v1"; + // "Data Definition Language" requests, that create, modify or delete the // database structures but not the data. `DdlRequest` could carry more // information than plain SQL, for example, the "table_id" in `CreateTableExpr`. @@ -174,11 +174,17 @@ message DropDefaults { repeated DropDefault drop_defaults = 1; } -message DropColumns { repeated DropColumn drop_columns = 1; } +message DropColumns { + repeated DropColumn drop_columns = 1; +} -message ModifyColumnTypes { repeated ModifyColumnType modify_column_types = 1; } +message ModifyColumnTypes { + repeated ModifyColumnType modify_column_types = 1; +} -message RenameTable { string new_table_name = 1; } +message RenameTable { + string new_table_name = 1; +} message AddColumn { ColumnDef column_def = 1; @@ -198,18 +204,24 @@ message Option { } message SetTableOptions { - repeated Option table_options = 1; + repeated Option table_options = 1; } message UnsetTableOptions { - repeated string keys = 1; + repeated string keys = 1; } -message DropColumn { string name = 1; } +message DropColumn { + string name = 1; +} -message TableId { uint32 id = 1; } +message TableId { + uint32 id = 1; +} -message FlowId { uint32 id = 1; } +message FlowId { + uint32 id = 1; +} message ColumnDef { string name = 1; @@ -236,104 +248,104 @@ message AddColumnLocation { } enum Analyzer { - ENGLISH = 0; - CHINESE = 1; + ENGLISH = 0; + CHINESE = 1; } enum FulltextBackend { - TANTIVY = 0; - BLOOM = 1; + TANTIVY = 0; + BLOOM = 1; } message SetFulltext { - string column_name = 1; - bool enable = 2; - Analyzer analyzer = 3; - bool case_sensitive = 4; - FulltextBackend backend = 5; - // The granularity for the fulltext index (for bloom backend only). - uint64 granularity = 6; - // The false positive rate for the fulltext index (for bloom backend only). - double false_positive_rate = 7; + string column_name = 1; + bool enable = 2; + Analyzer analyzer = 3; + bool case_sensitive = 4; + FulltextBackend backend = 5; + // The granularity for the fulltext index (for bloom backend only). + uint64 granularity = 6; + // The false positive rate for the fulltext index (for bloom backend only). + double false_positive_rate = 7; } message UnsetFulltext { - string column_name = 1; + string column_name = 1; } message SetInverted { - string column_name = 1; + string column_name = 1; } message UnsetInverted { - string column_name = 1; + string column_name = 1; } enum SkippingIndexType { - BLOOM_FILTER = 0; + BLOOM_FILTER = 0; } message SetSkipping { - string column_name = 1; - bool enable = 2; - uint64 granularity = 3; - SkippingIndexType skipping_index_type = 4; - double false_positive_rate = 5; + string column_name = 1; + bool enable = 2; + uint64 granularity = 3; + SkippingIndexType skipping_index_type = 4; + double false_positive_rate = 5; } message UnsetSkipping { - string column_name = 1; + string column_name = 1; } message AlterDatabaseExpr { - string catalog_name = 1; - string schema_name = 2; - oneof kind { - SetDatabaseOptions set_database_options = 3; - UnsetDatabaseOptions unset_database_options = 4; - } + string catalog_name = 1; + string schema_name = 2; + oneof kind { + SetDatabaseOptions set_database_options = 3; + UnsetDatabaseOptions unset_database_options = 4; + } } message SetDatabaseOptions { - repeated Option set_database_options = 1; + repeated Option set_database_options = 1; } message UnsetDatabaseOptions { - repeated string keys = 1; + repeated string keys = 1; } // The create trigger expression. message CreateTriggerExpr { - string catalog_name = 1; - string trigger_name = 2; - bool create_if_not_exists = 3; - // The SQL statement to be executed periodically. - string sql = 4; - // The channels for sending notifications. - repeated NotifyChannel channels = 5; - // The user-defined labels. - map labels = 6; - // The user-defined annotations. - map annotations = 7; - // The execution interval for sql query in seconds. - uint64 interval = 8; + string catalog_name = 1; + string trigger_name = 2; + bool create_if_not_exists = 3; + // The SQL statement to be executed periodically. + string sql = 4; + // The channels for sending notifications. + repeated NotifyChannel channels = 5; + // The user-defined labels. + map labels = 6; + // The user-defined annotations. + map annotations = 7; + // The execution interval for sql query in seconds. + uint64 interval = 8; } // The notification channel for trigger. message NotifyChannel { - string name = 1; - oneof channel_type { - WebhookOptions webhook = 2; - } + string name = 1; + oneof channel_type { + WebhookOptions webhook = 2; + } } // The options for webhook. message WebhookOptions { - string url = 1; - map opts = 2; + string url = 1; + map opts = 2; } message DropTriggerExpr { - string catalog_name = 1; - string trigger_name = 2; - bool drop_if_exists = 3; + string catalog_name = 1; + string trigger_name = 2; + bool drop_if_exists = 3; } diff --git a/proto/greptime/v1/flow/server.proto b/proto/greptime/v1/flow/server.proto index 226a27f..32c3e1b 100644 --- a/proto/greptime/v1/flow/server.proto +++ b/proto/greptime/v1/flow/server.proto @@ -16,14 +16,14 @@ syntax = "proto3"; package greptime.v1.flow; -option java_package = "io.greptime.v1.flow"; -option java_outer_classname = "Server"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/flow"; - import "greptime/v1/common.proto"; import "greptime/v1/ddl.proto"; import "greptime/v1/row.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/flow"; +option java_outer_classname = "Server"; +option java_package = "io.greptime.v1.flow"; + service Flow { // Handle the control plane request for creating or removing a flow. rpc HandleCreateRemove(FlowRequest) returns (FlowResponse); @@ -56,7 +56,9 @@ message FlowRequestHeader { QueryContext query_context = 2; } -message InsertRequests {repeated InsertRequest requests = 1;} +message InsertRequests { + repeated InsertRequest requests = 1; +} message InsertRequest { uint64 region_id = 1; @@ -98,7 +100,9 @@ message CreateRequest { bool or_replace = 9; } -message DropRequest {FlowId flow_id = 1;} +message DropRequest { + FlowId flow_id = 1; +} message FlushFlow { FlowId flow_id = 1; diff --git a/proto/greptime/v1/frontend/server.proto b/proto/greptime/v1/frontend/server.proto index 8fa51d2..6f9f52d 100644 --- a/proto/greptime/v1/frontend/server.proto +++ b/proto/greptime/v1/frontend/server.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package greptime.v1.frontend; -option java_package = "io.greptime.v1.frontend"; -option java_outer_classname = "Server"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/frontend"; +option java_outer_classname = "Server"; +option java_package = "io.greptime.v1.frontend"; service Frontend { // List all running processes on frontend. diff --git a/proto/greptime/v1/health.proto b/proto/greptime/v1/health.proto index d9a2e05..c3437f5 100644 --- a/proto/greptime/v1/health.proto +++ b/proto/greptime/v1/health.proto @@ -16,9 +16,9 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "Health"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Health"; +option java_package = "io.greptime.v1"; service HealthCheck { rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse); diff --git a/proto/greptime/v1/index/bloom_filter.proto b/proto/greptime/v1/index/bloom_filter.proto index 36e13d6..7d36ad7 100644 --- a/proto/greptime/v1/index/bloom_filter.proto +++ b/proto/greptime/v1/index/bloom_filter.proto @@ -20,33 +20,33 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index // BloomFilterMeta defines the metadata for a bloom filter. message BloomFilterMeta { - // The number of rows per segment. - uint64 rows_per_segment = 1; + // The number of rows per segment. + uint64 rows_per_segment = 1; - // The number of segments. - uint64 segment_count = 2; + // The number of segments. + uint64 segment_count = 2; - // The number of total rows. - uint64 row_count = 3; + // The number of total rows. + uint64 row_count = 3; - // The size of the bloom filter in bytes excluding the metadata. - uint64 bloom_filter_size = 4; + // The size of the bloom filter in bytes excluding the metadata. + uint64 bloom_filter_size = 4; - // The indices to the bloom filter location of each segment. - repeated uint64 segment_loc_indices = 5; + // The indices to the bloom filter location of each segment. + repeated uint64 segment_loc_indices = 5; - // The bloom filter locations. - repeated BloomFilterLoc bloom_filter_locs = 6; + // The bloom filter locations. + repeated BloomFilterLoc bloom_filter_locs = 6; } // BloomFilterLoc defines the location of a bloom filter. message BloomFilterLoc { - // The byte offset of the bloom filter data. - uint64 offset = 1; + // The byte offset of the bloom filter data. + uint64 offset = 1; - // The size of the bloom filter data. - uint64 size = 2; + // The size of the bloom filter data. + uint64 size = 2; - // The number of elements in the bloom filter. - uint64 element_count = 3; + // The number of elements in the bloom filter. + uint64 element_count = 3; } diff --git a/proto/greptime/v1/index/inverted_index.proto b/proto/greptime/v1/index/inverted_index.proto index 0f6e590..e23771c 100644 --- a/proto/greptime/v1/index/inverted_index.proto +++ b/proto/greptime/v1/index/inverted_index.proto @@ -21,70 +21,70 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index // InvertedIndexMetas defines the metadata for an inverted index // within an inverted index blob. message InvertedIndexMetas { - // A map of tag names to their respective metadata corresponding to an individual - // inverted index within the inverted index blob. - map metas = 1; + // A map of tag names to their respective metadata corresponding to an individual + // inverted index within the inverted index blob. + map metas = 1; - // The total count of rows within the inverted index blob. - // This is used to determine the number of segments within the bitmap. - uint64 total_row_count = 2; + // The total count of rows within the inverted index blob. + // This is used to determine the number of segments within the bitmap. + uint64 total_row_count = 2; - // The number of rows per group for bitmap indexing which determines how rows are - // batched for indexing. Each batch corresponds to a segment in the bitmap and allows - // for efficient retrieval during queries by reducing the search space. - uint64 segment_row_count = 3; + // The number of rows per group for bitmap indexing which determines how rows are + // batched for indexing. Each batch corresponds to a segment in the bitmap and allows + // for efficient retrieval during queries by reducing the search space. + uint64 segment_row_count = 3; } // InvertedIndexMeta contains the metadata for a specific tag's inverted index. message InvertedIndexMeta { - // Name of the tag associated with the inverted index. - string name = 1; + // Name of the tag associated with the inverted index. + string name = 1; - // The base byte offset for this tag's inverted index data within the blob. - // Other offsets in this message are relative to this base offset. - uint64 base_offset = 2; + // The base byte offset for this tag's inverted index data within the blob. + // Other offsets in this message are relative to this base offset. + uint64 base_offset = 2; - // The total size in bytes of this tag's inverted index data, including bitmaps, - // FST data. - uint64 inverted_index_size = 3; + // The total size in bytes of this tag's inverted index data, including bitmaps, + // FST data. + uint64 inverted_index_size = 3; - // The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`. - uint32 relative_fst_offset = 4; + // The byte offset of the Finite State Transducer (FST) data relative to the `base_offset`. + uint32 relative_fst_offset = 4; - // The size in bytes of the FST data. - uint32 fst_size = 5; + // The size in bytes of the FST data. + uint32 fst_size = 5; - // The byte offset relative to the `base_offset` where the null bitmap for this tag - // starts. - uint32 relative_null_bitmap_offset = 6; + // The byte offset relative to the `base_offset` where the null bitmap for this tag + // starts. + uint32 relative_null_bitmap_offset = 6; - // The size in bytes of the null bitmap. - uint32 null_bitmap_size = 7; + // The size in bytes of the null bitmap. + uint32 null_bitmap_size = 7; - // Statistical information about the tag's inverted index. - InvertedIndexStats stats = 8; + // Statistical information about the tag's inverted index. + InvertedIndexStats stats = 8; - // The type of bitmap used for indexing. - BitmapType bitmap_type = 9; + // The type of bitmap used for indexing. + BitmapType bitmap_type = 9; } // InvertedIndexStats provides statistical data on a tag's inverted index. message InvertedIndexStats { - // The count of null entries within the tag's column. - uint64 null_count = 1; + // The count of null entries within the tag's column. + uint64 null_count = 1; - // The number of distinct values within the tag's column. - uint64 distinct_count = 2; + // The number of distinct values within the tag's column. + uint64 distinct_count = 2; - // The minimum value found within the tag's column, encoded as bytes. - bytes min_value = 3; + // The minimum value found within the tag's column, encoded as bytes. + bytes min_value = 3; - // The maximum value found within the tag's column, encoded as bytes. - bytes max_value = 4; + // The maximum value found within the tag's column, encoded as bytes. + bytes max_value = 4; } // BitmapType defines the type of bitmap used for indexing. enum BitmapType { - BitVec = 0; - Roaring = 1; + BitVec = 0; + Roaring = 1; } diff --git a/proto/greptime/v1/meta/cluster.proto b/proto/greptime/v1/meta/cluster.proto index 0f10771..138be7c 100644 --- a/proto/greptime/v1/meta/cluster.proto +++ b/proto/greptime/v1/meta/cluster.proto @@ -16,11 +16,11 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/store.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + // Cluster service is used for communication between meta nodes. service Cluster { // Batch get kvs by input keys from leader's in_memory kv store. @@ -33,7 +33,9 @@ service Cluster { rpc MetasrvPeers(MetasrvPeersRequest) returns (MetasrvPeersResponse); } -message MetasrvPeersRequest { RequestHeader header = 1; } +message MetasrvPeersRequest { + RequestHeader header = 1; +} message MetasrvPeersResponse { ResponseHeader header = 1; diff --git a/proto/greptime/v1/meta/common.proto b/proto/greptime/v1/meta/common.proto index 005eb0d..52c7163 100644 --- a/proto/greptime/v1/meta/common.proto +++ b/proto/greptime/v1/meta/common.proto @@ -65,4 +65,6 @@ message KeyValue { } // Procedure identifier -message ProcedureId { bytes key = 1; } +message ProcedureId { + bytes key = 1; +} diff --git a/proto/greptime/v1/meta/ddl.proto b/proto/greptime/v1/meta/ddl.proto index 1a39d58..3912588 100644 --- a/proto/greptime/v1/meta/ddl.proto +++ b/proto/greptime/v1/meta/ddl.proto @@ -16,110 +16,116 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - +import "greptime/v1/common.proto"; +import "greptime/v1/ddl.proto"; import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/route.proto"; -import "greptime/v1/ddl.proto"; -import "greptime/v1/common.proto"; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; enum DdlTaskType { - Create = 0; - Drop = 1; + Create = 0; + Drop = 1; } message CreateDatabaseTask { - CreateDatabaseExpr create_database = 1; + CreateDatabaseExpr create_database = 1; } message CreateTableTask { - CreateTableExpr create_table = 1; - repeated Partition partitions = 2; - bytes table_info = 3; + CreateTableExpr create_table = 1; + repeated Partition partitions = 2; + bytes table_info = 3; } -message CreateTableTasks { repeated CreateTableTask tasks = 1; } - -message DropTableTask{ - DropTableExpr drop_table = 1; +message CreateTableTasks { + repeated CreateTableTask tasks = 1; } -message DropTableTasks { repeated DropTableTask tasks = 1; } - -message AlterTableTask{ - AlterTableExpr alter_table = 1; +message DropTableTask { + DropTableExpr drop_table = 1; } -message AlterTableTasks { repeated AlterTableTask tasks = 1; } +message DropTableTasks { + repeated DropTableTask tasks = 1; +} + +message AlterTableTask { + AlterTableExpr alter_table = 1; +} + +message AlterTableTasks { + repeated AlterTableTask tasks = 1; +} message TruncateTableTask { - TruncateTableExpr truncate_table = 1; + TruncateTableExpr truncate_table = 1; } message DropDatabaseTask { - DropDatabaseExpr drop_database = 1; + DropDatabaseExpr drop_database = 1; } message CreateFlowTask { - CreateFlowExpr create_flow = 1; + CreateFlowExpr create_flow = 1; } message DropFlowTask { - DropFlowExpr drop_flow = 1; + DropFlowExpr drop_flow = 1; } // Create a view task message CreateViewTask { - CreateViewExpr create_view = 1; - bytes view_info = 2; + CreateViewExpr create_view = 1; + bytes view_info = 2; } // Drop a view task message DropViewTask { - DropViewExpr drop_view = 1; + DropViewExpr drop_view = 1; } // Alter database tasks message AlterDatabaseTask { - AlterDatabaseExpr task = 1; + AlterDatabaseExpr task = 1; } message CreateTriggerTask { - CreateTriggerExpr create_trigger = 1; + CreateTriggerExpr create_trigger = 1; } message DropTriggerTask { - DropTriggerExpr drop_trigger = 1; + DropTriggerExpr drop_trigger = 1; } message DdlTaskRequest { - RequestHeader header = 1; - QueryContext query_context = 64; + RequestHeader header = 1; + QueryContext query_context = 64; - oneof task { - CreateTableTask create_table_task = 2; - DropTableTask drop_table_task = 3; - AlterTableTask alter_table_task = 4; - TruncateTableTask truncate_table_task = 5; - CreateTableTasks create_table_tasks = 6; - DropTableTasks drop_table_tasks = 7; - AlterTableTasks alter_table_tasks = 8; - DropDatabaseTask drop_database_task = 9; - CreateDatabaseTask create_database_task = 10; - CreateFlowTask create_flow_task = 11; - DropFlowTask drop_flow_task = 12; - CreateViewTask create_view_task = 13; - DropViewTask drop_view_task = 14; - AlterDatabaseTask alter_database_task = 15; - CreateTriggerTask create_trigger_task = 16; - DropTriggerTask drop_trigger_task = 17; - } + oneof task { + CreateTableTask create_table_task = 2; + DropTableTask drop_table_task = 3; + AlterTableTask alter_table_task = 4; + TruncateTableTask truncate_table_task = 5; + CreateTableTasks create_table_tasks = 6; + DropTableTasks drop_table_tasks = 7; + AlterTableTasks alter_table_tasks = 8; + DropDatabaseTask drop_database_task = 9; + CreateDatabaseTask create_database_task = 10; + CreateFlowTask create_flow_task = 11; + DropFlowTask drop_flow_task = 12; + CreateViewTask create_view_task = 13; + DropViewTask drop_view_task = 14; + AlterDatabaseTask alter_database_task = 15; + CreateTriggerTask create_trigger_task = 16; + DropTriggerTask drop_trigger_task = 17; + } } message DdlTaskResponse { - ResponseHeader header = 1; - ProcedureId pid = 2; + ResponseHeader header = 1; + ProcedureId pid = 2; - // Returns if the tables created. - repeated TableId table_ids = 5; + // Returns if the tables created. + repeated TableId table_ids = 5; } diff --git a/proto/greptime/v1/meta/heartbeat.proto b/proto/greptime/v1/meta/heartbeat.proto index 57ee9f1..74f5cc3 100644 --- a/proto/greptime/v1/meta/heartbeat.proto +++ b/proto/greptime/v1/meta/heartbeat.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + service Heartbeat { // Heartbeat, there may be many contents of the heartbeat, such as: // 1. Metadata to be registered to meta server and discoverable by other @@ -138,7 +138,9 @@ message RegionLease { repeated uint64 closeable_region_ids = 4; } -message AskLeaderRequest { RequestHeader header = 1; } +message AskLeaderRequest { + RequestHeader header = 1; +} message AskLeaderResponse { ResponseHeader header = 1; @@ -156,5 +158,7 @@ message MailboxMessage { // The unix timestamp in milliseconds. int64 timestamp_millis = 5; // The message body. - oneof payload { string json = 6; } + oneof payload { + string json = 6; + } } diff --git a/proto/greptime/v1/meta/lock.proto b/proto/greptime/v1/meta/lock.proto index dbd9261..09609df 100644 --- a/proto/greptime/v1/meta/lock.proto +++ b/proto/greptime/v1/meta/lock.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + service Lock { // Lock acquires a distributed shared lock on a given named lock. On success, // it will return a unique key that exists so long as the lock is held by the @@ -55,4 +55,6 @@ message UnlockRequest { bytes key = 2; } -message UnlockResponse { ResponseHeader header = 1; } +message UnlockResponse { + ResponseHeader header = 1; +} diff --git a/proto/greptime/v1/meta/procedure.proto b/proto/greptime/v1/meta/procedure.proto index 72b7701..7bb22f8 100644 --- a/proto/greptime/v1/meta/procedure.proto +++ b/proto/greptime/v1/meta/procedure.proto @@ -6,62 +6,62 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/ddl.proto"; import "greptime/v1/meta/region.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + enum ProcedureStatus { - Running = 0; - Done = 1; - Retrying = 2; - Failed = 3; - PrepareRollback = 4; - RollingBack = 5; - Poisoned = 6; + Running = 0; + Done = 1; + Retrying = 2; + Failed = 3; + PrepareRollback = 4; + RollingBack = 5; + Poisoned = 6; } message ProcedureMeta { - ProcedureId id = 1; - string type_name = 2; - ProcedureStatus status = 3; - int64 start_time_ms = 4; - int64 end_time_ms = 5; - repeated string lock_keys = 6; - string error = 7; + ProcedureId id = 1; + string type_name = 2; + ProcedureStatus status = 3; + int64 start_time_ms = 4; + int64 end_time_ms = 5; + repeated string lock_keys = 6; + string error = 7; } message QueryProcedureRequest { - RequestHeader header = 1; - ProcedureId pid = 2; + RequestHeader header = 1; + ProcedureId pid = 2; } message ProcedureStateResponse { - ResponseHeader header = 1; - ProcedureStatus status = 2; - string error = 3; + ResponseHeader header = 1; + ProcedureStatus status = 2; + string error = 3; } message ProcedureDetailRequest { - RequestHeader header = 1; + RequestHeader header = 1; } message ProcedureDetailResponse { - ResponseHeader header = 1; - repeated ProcedureMeta procedures = 2; + ResponseHeader header = 1; + repeated ProcedureMeta procedures = 2; } service ProcedureService { - // Query a submitted procedure state - rpc query(QueryProcedureRequest) returns (ProcedureStateResponse); + // Query a submitted procedure state + rpc query(QueryProcedureRequest) returns (ProcedureStateResponse); - // Submits a DDL task - rpc ddl(DdlTaskRequest) returns (DdlTaskResponse); + // Submits a DDL task + rpc ddl(DdlTaskRequest) returns (DdlTaskResponse); - // Submits a region migration task - rpc migrate(MigrateRegionRequest) returns (MigrateRegionResponse); + // Submits a region migration task + rpc migrate(MigrateRegionRequest) returns (MigrateRegionResponse); - // Query all submitted procedures details - rpc details(ProcedureDetailRequest) returns (ProcedureDetailResponse); + // Query all submitted procedures details + rpc details(ProcedureDetailRequest) returns (ProcedureDetailResponse); } diff --git a/proto/greptime/v1/meta/region.proto b/proto/greptime/v1/meta/region.proto index 3b00850..90067b3 100644 --- a/proto/greptime/v1/meta/region.proto +++ b/proto/greptime/v1/meta/region.proto @@ -16,19 +16,19 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + message MigrateRegionRequest { - RequestHeader header = 1; - uint64 region_id = 3; - uint64 from_peer = 4; - uint64 to_peer = 5; - uint32 timeout_secs = 6; + RequestHeader header = 1; + uint64 region_id = 3; + uint64 from_peer = 4; + uint64 to_peer = 5; + uint32 timeout_secs = 6; } message MigrateRegionResponse { - ResponseHeader header = 1; - ProcedureId pid = 2; + ResponseHeader header = 1; + ProcedureId pid = 2; } diff --git a/proto/greptime/v1/meta/route.proto b/proto/greptime/v1/meta/route.proto index 7166bca..532e4a8 100644 --- a/proto/greptime/v1/meta/route.proto +++ b/proto/greptime/v1/meta/route.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - -import "greptime/v1/meta/common.proto"; import "greptime/v1/common.proto"; +import "greptime/v1/meta/common.proto"; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; message TableRoute { Table table = 1; @@ -60,4 +60,4 @@ message Partition { message TableRouteValue { repeated Peer peers = 1; TableRoute table_route = 2; -} \ No newline at end of file +} diff --git a/proto/greptime/v1/meta/store.proto b/proto/greptime/v1/meta/store.proto index 9f630be..742deb0 100644 --- a/proto/greptime/v1/meta/store.proto +++ b/proto/greptime/v1/meta/store.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package greptime.v1.meta; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; - import "greptime/v1/meta/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta"; + service Store { // Range gets the keys in the range from the key-value store. rpc Range(RangeRequest) returns (RangeResponse); diff --git a/proto/greptime/v1/prom.proto b/proto/greptime/v1/prom.proto index 5cd493f..c6fb6cb 100644 --- a/proto/greptime/v1/prom.proto +++ b/proto/greptime/v1/prom.proto @@ -16,12 +16,12 @@ 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"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "Prometheus"; +option java_package = "io.greptime.v1"; + // PrometheusGateway behaves absolutely the same as Prometheus HTTP API service PrometheusGateway { rpc Handle(PromqlRequest) returns (PromqlResponse); diff --git a/proto/greptime/v1/region/server.proto b/proto/greptime/v1/region/server.proto index 1fa5c3e..dadd52d 100644 --- a/proto/greptime/v1/region/server.proto +++ b/proto/greptime/v1/region/server.proto @@ -16,15 +16,17 @@ syntax = "proto3"; package greptime.v1.region; -option java_package = "io.greptime.v1.region"; -option java_outer_classname = "Server"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/region"; - import "greptime/v1/common.proto"; -import "greptime/v1/row.proto"; import "greptime/v1/ddl.proto"; +import "greptime/v1/row.proto"; -service Region { rpc Handle(RegionRequest) returns (RegionResponse); } +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/region"; +option java_outer_classname = "Server"; +option java_package = "io.greptime.v1.region"; + +service Region { + rpc Handle(RegionRequest) returns (RegionResponse); +} message RegionRequestHeader { // Encoded trace_id & span_id, follow the w3c Trace Context @@ -70,9 +72,13 @@ message RegionResponse { bytes metadata = 4; } -message InsertRequests { repeated InsertRequest requests = 1; } +message InsertRequests { + repeated InsertRequest requests = 1; +} -message DeleteRequests { repeated DeleteRequest requests = 1; } +message DeleteRequests { + repeated DeleteRequest requests = 1; +} message InsertRequest { uint64 region_id = 1; @@ -94,7 +100,9 @@ message QueryRequest { // Create a batch of regions at once, usually used to create multiple logical // regions at once. Different engines can choose whether to support this // request. Metric Engine needs it. -message CreateRequests { repeated CreateRequest requests = 1; } +message CreateRequests { + repeated CreateRequest requests = 1; +} message CreateRequest { uint64 region_id = 1; @@ -112,7 +120,9 @@ message CreateRequest { } // Same as CreateRequests, but for dropping regions. -message DropRequests { repeated DropRequest requests = 1; } +message DropRequests { + repeated DropRequest requests = 1; +} message DropRequest { uint64 region_id = 1; @@ -132,9 +142,13 @@ message OpenRequest { map options = 4; } -message CloseRequest { uint64 region_id = 1; } +message CloseRequest { + uint64 region_id = 1; +} -message AlterRequests { repeated AlterRequest requests = 1; } +message AlterRequests { + repeated AlterRequest requests = 1; +} message AlterRequest { uint64 region_id = 1; @@ -152,18 +166,26 @@ message AlterRequest { uint64 schema_version = 4; } -message AddColumns { repeated AddColumn add_columns = 1; } +message AddColumns { + repeated AddColumn add_columns = 1; +} -message DropColumns { repeated DropColumn drop_columns = 1; } +message DropColumns { + repeated DropColumn drop_columns = 1; +} message AddColumn { RegionColumnDef column_def = 1; AddColumnLocation location = 3; } -message DropColumn { string name = 1; } +message DropColumn { + string name = 1; +} -message FlushRequest { uint64 region_id = 1; } +message FlushRequest { + uint64 region_id = 1; +} /// Regular compaction message Regular {} @@ -174,14 +196,16 @@ message StrictWindow { } message CompactRequest { - uint64 region_id = 1; - oneof options { - Regular regular = 2; - StrictWindow strict_window = 3; - } + uint64 region_id = 1; + oneof options { + Regular regular = 2; + StrictWindow strict_window = 3; + } } -message TruncateRequest { uint64 region_id = 1; } +message TruncateRequest { + uint64 region_id = 1; +} // The column definition of a region. Unlike the message `ColumnDef` in // `ddl.proto` which is for clients outside GreptimeDB, this `RegionColumnDef` diff --git a/proto/greptime/v1/row.proto b/proto/greptime/v1/row.proto index d9f9b1d..3ad91c7 100644 --- a/proto/greptime/v1/row.proto +++ b/proto/greptime/v1/row.proto @@ -16,12 +16,12 @@ syntax = "proto3"; package greptime.v1; -option java_package = "io.greptime.v1"; -option java_outer_classname = "RowData"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - import "greptime/v1/common.proto"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; +option java_outer_classname = "RowData"; +option java_package = "io.greptime.v1"; + message Rows { repeated ColumnSchema schema = 1; repeated Row rows = 2; @@ -39,7 +39,9 @@ message ColumnSchema { ColumnOptions options = 5; } -message Row { repeated Value values = 1; } +message Row { + repeated Value values = 1; +} message Value { oneof value_data { diff --git a/proto/greptime/v1/wal.proto b/proto/greptime/v1/wal.proto index a9e6eb9..29a831d 100644 --- a/proto/greptime/v1/wal.proto +++ b/proto/greptime/v1/wal.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package greptime.v1; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - -import "greptime/v1/row.proto"; import "greptime/v1/common.proto"; +import "greptime/v1/row.proto"; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; // Type of operation to rows. enum OpType { diff --git a/proto/prometheus/remote/remote.proto b/proto/prometheus/remote/remote.proto index b98ad61..5da638a 100644 --- a/proto/prometheus/remote/remote.proto +++ b/proto/prometheus/remote/remote.proto @@ -14,17 +14,17 @@ syntax = "proto3"; package prometheus; +import "prometheus/remote/types.proto"; + // GreptimeTeam modify the original go_package definition to make it consistent with the go package name. // And we also remove the gogoproto dependency which is now deprecated. option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote"; -import "prometheus/remote/types.proto"; - message WriteRequest { repeated prometheus.TimeSeries timeseries = 1; // Cortex uses this field to determine the source of the write request. // We reserve it to avoid any compatibility issues. - reserved 2; + reserved 2; repeated prometheus.MetricMetadata metadata = 3; } diff --git a/proto/prometheus/remote/types.proto b/proto/prometheus/remote/types.proto index 293f082..d9f7aa9 100644 --- a/proto/prometheus/remote/types.proto +++ b/proto/prometheus/remote/types.proto @@ -20,14 +20,14 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote message MetricMetadata { enum MetricType { - UNKNOWN = 0; - COUNTER = 1; - GAUGE = 2; - HISTOGRAM = 3; + UNKNOWN = 0; + COUNTER = 1; + GAUGE = 2; + HISTOGRAM = 3; GAUGEHISTOGRAM = 4; - SUMMARY = 5; - INFO = 6; - STATESET = 7; + SUMMARY = 5; + INFO = 6; + STATESET = 7; } // Represents the metric type, these match the set from Prometheus. @@ -39,7 +39,7 @@ message MetricMetadata { } message Sample { - double value = 1; + double value = 1; // timestamp is in ms format, see model/timestamp/timestamp.go for // conversion from time.Time to Prometheus timestamp. int64 timestamp = 2; @@ -58,13 +58,13 @@ message Exemplar { message TimeSeries { // For a timeseries to be valid, and for the samples and exemplars // to be ingested by the remote system properly, the labels field is required. - repeated Label labels = 1; + repeated Label labels = 1; repeated Sample samples = 2; repeated Exemplar exemplars = 3; } message Label { - string name = 1; + string name = 1; string value = 2; } @@ -75,21 +75,21 @@ message Labels { // Matcher specifies a rule, which can match or set of labels or not. message LabelMatcher { enum Type { - EQ = 0; + EQ = 0; NEQ = 1; - RE = 2; + RE = 2; NRE = 3; } - Type type = 1; - string name = 2; + Type type = 1; + string name = 2; string value = 3; } message ReadHints { - int64 step_ms = 1; // Query step size in milliseconds. - string func = 2; // String representation of surrounding function or aggregation. + int64 step_ms = 1; // Query step size in milliseconds. + string func = 2; // String representation of surrounding function or aggregation. int64 start_ms = 3; // Start time in milliseconds. - int64 end_ms = 4; // End time in milliseconds. + int64 end_ms = 4; // End time in milliseconds. repeated string grouping = 5; // List of label names used in aggregation. bool by = 6; // Indicate whether it is without or by. int64 range_ms = 7; // Range vector selector range in milliseconds. @@ -104,10 +104,10 @@ message Chunk { // We require this to match chunkenc.Encoding. enum Encoding { UNKNOWN = 0; - XOR = 1; + XOR = 1; } - Encoding type = 3; - bytes data = 4; + Encoding type = 3; + bytes data = 4; } // ChunkedSeries represents single, encoded time series. diff --git a/proto/substrait_extension/dist_plan.proto b/proto/substrait_extension/dist_plan.proto index cbae61f..8bd6ad5 100644 --- a/proto/substrait_extension/dist_plan.proto +++ b/proto/substrait_extension/dist_plan.proto @@ -14,10 +14,10 @@ syntax = "proto3"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension"; - package substrait_extension; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension"; + message MergeScan { // the input logical plan bytes input = 1; diff --git a/proto/substrait_extension/promql_plan.proto b/proto/substrait_extension/promql_plan.proto index 6c98979..c82ce5e 100644 --- a/proto/substrait_extension/promql_plan.proto +++ b/proto/substrait_extension/promql_plan.proto @@ -14,10 +14,10 @@ syntax = "proto3"; -option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension"; - package substrait_extension; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension"; + message EmptyMetric { // Start timestamp in millisecond int64 start = 1;