chore: format proto file (#254)

* chore: proto file format using buf

* generate go file
This commit is contained in:
fys
2025-07-16 11:25:57 +08:00
committed by GitHub
parent ceb1af4fa9
commit 855dff1b87
30 changed files with 432 additions and 354 deletions
+11 -11
View File
@@ -861,14 +861,14 @@ var File_greptime_v1_database_proto protoreflect.FileDescriptor
var file_greptime_v1_database_proto_rawDesc = []byte{ var file_greptime_v1_database_proto_rawDesc = []byte{
0x0a, 0x1a, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 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, 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, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72,
0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31,
0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67,
0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70,
0x6f, 0x1a, 0x16, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
0x72, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72,
0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 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, 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, 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, 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 { if File_greptime_v1_database_proto != nil {
return return
} }
file_greptime_v1_ddl_proto_init()
file_greptime_v1_column_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_common_proto_init()
file_greptime_v1_ddl_proto_init()
file_greptime_v1_prom_proto_init()
file_greptime_v1_row_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_greptime_v1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_greptime_v1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GreptimeRequest); i { switch v := v.(*GreptimeRequest); i {
+7 -7
View File
@@ -1222,14 +1222,14 @@ var File_greptime_v1_meta_ddl_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 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, 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, 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, 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, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x12,
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,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 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, 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, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72,
+3 -3
View File
@@ -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, 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, 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, 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, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f,
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70,
0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 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, 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, 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, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
+4 -4
View File
@@ -420,9 +420,9 @@ var File_greptime_v1_wal_proto protoreflect.FileDescriptor
var file_greptime_v1_wal_proto_rawDesc = []byte{ var file_greptime_v1_wal_proto_rawDesc = []byte{
0x0a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 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, 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, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 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, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 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, 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, 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, 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 { if File_greptime_v1_wal_proto != nil {
return return
} }
file_greptime_v1_row_proto_init()
file_greptime_v1_common_proto_init() file_greptime_v1_common_proto_init()
file_greptime_v1_row_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_greptime_v1_wal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_greptime_v1_wal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WriteHint); i { switch v := v.(*WriteHint); i {
+4 -4
View File
@@ -16,12 +16,12 @@ syntax = "proto3";
package greptime.v1; 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"; 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 { message Column {
string column_name = 1; string column_name = 1;
SemanticType semantic_type = 2; SemanticType semantic_type = 2;
+17 -7
View File
@@ -16,9 +16,9 @@ syntax = "proto3";
package greptime.v1; 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 go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
option java_outer_classname = "Common";
option java_package = "io.greptime.v1";
message QueryContext { message QueryContext {
string current_catalog = 1; string current_catalog = 1;
@@ -61,7 +61,9 @@ message RequestHeader {
string timezone = 6; string timezone = 6;
} }
message ResponseHeader { Status status = 1; } message ResponseHeader {
Status status = 1;
}
message Status { message Status {
// Corresponding to the `StatusCode` definition of GreptimeDB // Corresponding to the `StatusCode` definition of GreptimeDB
@@ -81,7 +83,9 @@ message Basic {
string password = 2; string password = 2;
} }
message Token { string token = 1; } message Token {
string token = 1;
}
message TableName { message TableName {
string catalog_name = 1; string catalog_name = 1;
@@ -89,11 +93,17 @@ message TableName {
string table_name = 3; 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 { message FlightMetadata {
AffectedRows affected_rows = 1; AffectedRows affected_rows = 1;
+22 -12
View File
@@ -16,15 +16,15 @@ syntax = "proto3";
package greptime.v1; 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/column.proto";
import "greptime/v1/row.proto";
import "greptime/v1/prom.proto";
import "greptime/v1/common.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 { service GreptimeDatabase {
rpc Handle(GreptimeRequest) returns (GreptimeResponse); rpc Handle(GreptimeRequest) returns (GreptimeResponse);
@@ -46,7 +46,9 @@ message GreptimeRequest {
message GreptimeResponse { message GreptimeResponse {
ResponseHeader header = 1; ResponseHeader header = 1;
oneof response { AffectedRows affected_rows = 2; } oneof response {
AffectedRows affected_rows = 2;
}
} }
message QueryRequest { message QueryRequest {
@@ -65,7 +67,9 @@ message InsertIntoPlan {
bytes logical_plan = 2; bytes logical_plan = 2;
} }
message InsertRequests { repeated InsertRequest inserts = 1; } message InsertRequests {
repeated InsertRequest inserts = 1;
}
message InsertRequest { message InsertRequest {
string table_name = 1; string table_name = 1;
@@ -79,7 +83,9 @@ message InsertRequest {
uint32 row_count = 4; uint32 row_count = 4;
} }
message DeleteRequests { repeated DeleteRequest deletes = 1; } message DeleteRequests {
repeated DeleteRequest deletes = 1;
}
message DeleteRequest { message DeleteRequest {
// The table name to delete from. Catalog name and schema name are in the // The table name to delete from. Catalog name and schema name are in the
@@ -93,7 +99,9 @@ message DeleteRequest {
uint32 row_count = 4; uint32 row_count = 4;
} }
message RowInsertRequests { repeated RowInsertRequest inserts = 1; } message RowInsertRequests {
repeated RowInsertRequest inserts = 1;
}
message RowInsertRequest { message RowInsertRequest {
string table_name = 1; string table_name = 1;
@@ -102,7 +110,9 @@ message RowInsertRequest {
Rows rows = 2; Rows rows = 2;
} }
message RowDeleteRequests { repeated RowDeleteRequest deletes = 1; } message RowDeleteRequests {
repeated RowDeleteRequest deletes = 1;
}
message RowDeleteRequest { message RowDeleteRequest {
// The table name to delete from. Catalog name and schema name are in the // The table name to delete from. Catalog name and schema name are in the
+22 -10
View File
@@ -16,12 +16,12 @@ syntax = "proto3";
package greptime.v1; 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"; 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 // "Data Definition Language" requests, that create, modify or delete the
// database structures but not the data. `DdlRequest` could carry more // database structures but not the data. `DdlRequest` could carry more
// information than plain SQL, for example, the "table_id" in `CreateTableExpr`. // information than plain SQL, for example, the "table_id" in `CreateTableExpr`.
@@ -174,11 +174,17 @@ message DropDefaults {
repeated DropDefault drop_defaults = 1; 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 { message AddColumn {
ColumnDef column_def = 1; ColumnDef column_def = 1;
@@ -205,11 +211,17 @@ 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 { message ColumnDef {
string name = 1; string name = 1;
+10 -6
View File
@@ -16,14 +16,14 @@ syntax = "proto3";
package greptime.v1.flow; 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/common.proto";
import "greptime/v1/ddl.proto"; import "greptime/v1/ddl.proto";
import "greptime/v1/row.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 { service Flow {
// Handle the control plane request for creating or removing a flow. // Handle the control plane request for creating or removing a flow.
rpc HandleCreateRemove(FlowRequest) returns (FlowResponse); rpc HandleCreateRemove(FlowRequest) returns (FlowResponse);
@@ -56,7 +56,9 @@ message FlowRequestHeader {
QueryContext query_context = 2; QueryContext query_context = 2;
} }
message InsertRequests {repeated InsertRequest requests = 1;} message InsertRequests {
repeated InsertRequest requests = 1;
}
message InsertRequest { message InsertRequest {
uint64 region_id = 1; uint64 region_id = 1;
@@ -98,7 +100,9 @@ message CreateRequest {
bool or_replace = 9; bool or_replace = 9;
} }
message DropRequest {FlowId flow_id = 1;} message DropRequest {
FlowId flow_id = 1;
}
message FlushFlow { message FlushFlow {
FlowId flow_id = 1; FlowId flow_id = 1;
+2 -2
View File
@@ -16,9 +16,9 @@ syntax = "proto3";
package greptime.v1.frontend; 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 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 { service Frontend {
// List all running processes on frontend. // List all running processes on frontend.
+2 -2
View File
@@ -16,9 +16,9 @@ syntax = "proto3";
package greptime.v1; 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 go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
option java_outer_classname = "Health";
option java_package = "io.greptime.v1";
service HealthCheck { service HealthCheck {
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse); rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
+5 -3
View File
@@ -16,11 +16,11 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
import "greptime/v1/meta/store.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. // Cluster service is used for communication between meta nodes.
service Cluster { service Cluster {
// Batch get kvs by input keys from leader's in_memory kv store. // Batch get kvs by input keys from leader's in_memory kv store.
@@ -33,7 +33,9 @@ service Cluster {
rpc MetasrvPeers(MetasrvPeersRequest) returns (MetasrvPeersResponse); rpc MetasrvPeers(MetasrvPeersRequest) returns (MetasrvPeersResponse);
} }
message MetasrvPeersRequest { RequestHeader header = 1; } message MetasrvPeersRequest {
RequestHeader header = 1;
}
message MetasrvPeersResponse { message MetasrvPeersResponse {
ResponseHeader header = 1; ResponseHeader header = 1;
+3 -1
View File
@@ -65,4 +65,6 @@ message KeyValue {
} }
// Procedure identifier // Procedure identifier
message ProcedureId { bytes key = 1; } message ProcedureId {
bytes key = 1;
}
+13 -7
View File
@@ -16,12 +16,12 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
import "greptime/v1/meta/route.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 { enum DdlTaskType {
Create = 0; Create = 0;
@@ -38,19 +38,25 @@ message CreateTableTask {
bytes table_info = 3; bytes table_info = 3;
} }
message CreateTableTasks { repeated CreateTableTask tasks = 1; } message CreateTableTasks {
repeated CreateTableTask tasks = 1;
}
message DropTableTask { message DropTableTask {
DropTableExpr drop_table = 1; DropTableExpr drop_table = 1;
} }
message DropTableTasks { repeated DropTableTask tasks = 1; } message DropTableTasks {
repeated DropTableTask tasks = 1;
}
message AlterTableTask { message AlterTableTask {
AlterTableExpr alter_table = 1; AlterTableExpr alter_table = 1;
} }
message AlterTableTasks { repeated AlterTableTask tasks = 1; } message AlterTableTasks {
repeated AlterTableTask tasks = 1;
}
message TruncateTableTask { message TruncateTableTask {
TruncateTableExpr truncate_table = 1; TruncateTableExpr truncate_table = 1;
+8 -4
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
service Heartbeat { service Heartbeat {
// Heartbeat, there may be many contents of the heartbeat, such as: // Heartbeat, there may be many contents of the heartbeat, such as:
// 1. Metadata to be registered to meta server and discoverable by other // 1. Metadata to be registered to meta server and discoverable by other
@@ -138,7 +138,9 @@ message RegionLease {
repeated uint64 closeable_region_ids = 4; repeated uint64 closeable_region_ids = 4;
} }
message AskLeaderRequest { RequestHeader header = 1; } message AskLeaderRequest {
RequestHeader header = 1;
}
message AskLeaderResponse { message AskLeaderResponse {
ResponseHeader header = 1; ResponseHeader header = 1;
@@ -156,5 +158,7 @@ message MailboxMessage {
// The unix timestamp in milliseconds. // The unix timestamp in milliseconds.
int64 timestamp_millis = 5; int64 timestamp_millis = 5;
// The message body. // The message body.
oneof payload { string json = 6; } oneof payload {
string json = 6;
}
} }
+5 -3
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
service Lock { service Lock {
// Lock acquires a distributed shared lock on a given named lock. On success, // 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 // 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; bytes key = 2;
} }
message UnlockResponse { ResponseHeader header = 1; } message UnlockResponse {
ResponseHeader header = 1;
}
+2 -2
View File
@@ -6,12 +6,12 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
import "greptime/v1/meta/ddl.proto"; import "greptime/v1/meta/ddl.proto";
import "greptime/v1/meta/region.proto"; import "greptime/v1/meta/region.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
enum ProcedureStatus { enum ProcedureStatus {
Running = 0; Running = 0;
Done = 1; Done = 1;
+2 -2
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
message MigrateRegionRequest { message MigrateRegionRequest {
RequestHeader header = 1; RequestHeader header = 1;
uint64 region_id = 3; uint64 region_id = 3;
+3 -3
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
import "greptime/v1/meta/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
message TableRoute { message TableRoute {
Table table = 1; Table table = 1;
+2 -2
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1.meta; 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/common.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
service Store { service Store {
// Range gets the keys in the range from the key-value store. // Range gets the keys in the range from the key-value store.
rpc Range(RangeRequest) returns (RangeResponse); rpc Range(RangeRequest) returns (RangeResponse);
+4 -4
View File
@@ -16,12 +16,12 @@ syntax = "proto3";
package greptime.v1; 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"; 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 // PrometheusGateway behaves absolutely the same as Prometheus HTTP API
service PrometheusGateway { service PrometheusGateway {
rpc Handle(PromqlRequest) returns (PromqlResponse); rpc Handle(PromqlRequest) returns (PromqlResponse);
+41 -17
View File
@@ -16,15 +16,17 @@ syntax = "proto3";
package greptime.v1.region; 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/common.proto";
import "greptime/v1/row.proto";
import "greptime/v1/ddl.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 { message RegionRequestHeader {
// Encoded trace_id & span_id, follow the w3c Trace Context // Encoded trace_id & span_id, follow the w3c Trace Context
@@ -70,9 +72,13 @@ message RegionResponse {
bytes metadata = 4; 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 { message InsertRequest {
uint64 region_id = 1; uint64 region_id = 1;
@@ -94,7 +100,9 @@ message QueryRequest {
// Create a batch of regions at once, usually used to create multiple logical // Create a batch of regions at once, usually used to create multiple logical
// regions at once. Different engines can choose whether to support this // regions at once. Different engines can choose whether to support this
// request. Metric Engine needs it. // request. Metric Engine needs it.
message CreateRequests { repeated CreateRequest requests = 1; } message CreateRequests {
repeated CreateRequest requests = 1;
}
message CreateRequest { message CreateRequest {
uint64 region_id = 1; uint64 region_id = 1;
@@ -112,7 +120,9 @@ message CreateRequest {
} }
// Same as CreateRequests, but for dropping regions. // Same as CreateRequests, but for dropping regions.
message DropRequests { repeated DropRequest requests = 1; } message DropRequests {
repeated DropRequest requests = 1;
}
message DropRequest { message DropRequest {
uint64 region_id = 1; uint64 region_id = 1;
@@ -132,9 +142,13 @@ message OpenRequest {
map<string, string> options = 4; map<string, string> 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 { message AlterRequest {
uint64 region_id = 1; uint64 region_id = 1;
@@ -152,18 +166,26 @@ message AlterRequest {
uint64 schema_version = 4; 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 { message AddColumn {
RegionColumnDef column_def = 1; RegionColumnDef column_def = 1;
AddColumnLocation location = 3; 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 /// Regular compaction
message Regular {} message Regular {}
@@ -181,7 +203,9 @@ message CompactRequest {
} }
} }
message TruncateRequest { uint64 region_id = 1; } message TruncateRequest {
uint64 region_id = 1;
}
// The column definition of a region. Unlike the message `ColumnDef` in // The column definition of a region. Unlike the message `ColumnDef` in
// `ddl.proto` which is for clients outside GreptimeDB, this `RegionColumnDef` // `ddl.proto` which is for clients outside GreptimeDB, this `RegionColumnDef`
+7 -5
View File
@@ -16,12 +16,12 @@ syntax = "proto3";
package greptime.v1; 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"; 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 { message Rows {
repeated ColumnSchema schema = 1; repeated ColumnSchema schema = 1;
repeated Row rows = 2; repeated Row rows = 2;
@@ -39,7 +39,9 @@ message ColumnSchema {
ColumnOptions options = 5; ColumnOptions options = 5;
} }
message Row { repeated Value values = 1; } message Row {
repeated Value values = 1;
}
message Value { message Value {
oneof value_data { oneof value_data {
+3 -3
View File
@@ -16,10 +16,10 @@ syntax = "proto3";
package greptime.v1; 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/common.proto";
import "greptime/v1/row.proto";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
// Type of operation to rows. // Type of operation to rows.
enum OpType { enum OpType {
+2 -2
View File
@@ -14,12 +14,12 @@
syntax = "proto3"; syntax = "proto3";
package prometheus; package prometheus;
import "prometheus/remote/types.proto";
// GreptimeTeam modify the original go_package definition to make it consistent with the go package name. // 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. // And we also remove the gogoproto dependency which is now deprecated.
option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote";
import "prometheus/remote/types.proto";
message WriteRequest { message WriteRequest {
repeated prometheus.TimeSeries timeseries = 1; repeated prometheus.TimeSeries timeseries = 1;
// Cortex uses this field to determine the source of the write request. // Cortex uses this field to determine the source of the write request.
+2 -2
View File
@@ -14,10 +14,10 @@
syntax = "proto3"; syntax = "proto3";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension";
package substrait_extension; package substrait_extension;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension";
message MergeScan { message MergeScan {
// the input logical plan // the input logical plan
bytes input = 1; bytes input = 1;
+2 -2
View File
@@ -14,10 +14,10 @@
syntax = "proto3"; syntax = "proto3";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension";
package substrait_extension; package substrait_extension;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension";
message EmptyMetric { message EmptyMetric {
// Start timestamp in millisecond // Start timestamp in millisecond
int64 start = 1; int64 start = 1;