feat: add GRPC client stream service to our GreptimeDB (#16)
This commit is contained in:
@@ -910,18 +910,23 @@ var file_greptime_v1_database_proto_rawDesc = []byte{
|
|||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77,
|
||||||
0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x32,
|
0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x32,
|
||||||
0x59, 0x0a, 0x10, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
|
0xaa, 0x01, 0x0a, 0x10, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x61, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1c, 0x2e,
|
0x62, 0x61, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1c,
|
||||||
|
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65,
|
||||||
|
0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67,
|
||||||
|
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65, 0x70, 0x74,
|
||||||
|
0x69, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x48,
|
||||||
|
0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x1c, 0x2e,
|
||||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65, 0x70,
|
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65, 0x70,
|
||||||
0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x72,
|
0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x72,
|
||||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
|
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||||
0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x51, 0x0a, 0x0e, 0x69, 0x6f,
|
0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x51, 0x0a, 0x0e,
|
||||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x44, 0x61,
|
0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x08,
|
||||||
0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||||
0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61,
|
||||||
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
|
0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70,
|
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -967,9 +972,11 @@ var file_greptime_v1_database_proto_depIdxs = []int32{
|
|||||||
13, // 10: greptime.v1.InsertRequest.columns:type_name -> greptime.v1.Column
|
13, // 10: greptime.v1.InsertRequest.columns:type_name -> greptime.v1.Column
|
||||||
10, // 11: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows
|
10, // 11: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows
|
||||||
4, // 12: greptime.v1.GreptimeDatabase.Handle:input_type -> greptime.v1.GreptimeRequest
|
4, // 12: greptime.v1.GreptimeDatabase.Handle:input_type -> greptime.v1.GreptimeRequest
|
||||||
6, // 13: greptime.v1.GreptimeDatabase.Handle:output_type -> greptime.v1.GreptimeResponse
|
4, // 13: greptime.v1.GreptimeDatabase.HandleRequests:input_type -> greptime.v1.GreptimeRequest
|
||||||
13, // [13:14] is the sub-list for method output_type
|
6, // 14: greptime.v1.GreptimeDatabase.Handle:output_type -> greptime.v1.GreptimeResponse
|
||||||
12, // [12:13] is the sub-list for method input_type
|
6, // 15: greptime.v1.GreptimeDatabase.HandleRequests:output_type -> greptime.v1.GreptimeResponse
|
||||||
|
14, // [14:16] is the sub-list for method output_type
|
||||||
|
12, // [12:14] is the sub-list for method input_type
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
12, // [12:12] is the sub-list for extension type_name
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
12, // [12:12] is the sub-list for extension extendee
|
||||||
0, // [0:12] is the sub-list for field type_name
|
0, // [0:12] is the sub-list for field type_name
|
||||||
|
|||||||
@@ -10292,11 +10292,13 @@ public final class Database {
|
|||||||
"(\r\022\025\n\rregion_number\030\005 \001(\r\"\035\n\014AffectedRow" +
|
"(\r\022\025\n\rregion_number\030\005 \001(\r\"\035\n\014AffectedRow" +
|
||||||
"s\022\r\n\005value\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raf" +
|
"s\022\r\n\005value\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raf" +
|
||||||
"fected_rows\030\001 \001(\0132\031.greptime.v1.Affected" +
|
"fected_rows\030\001 \001(\0132\031.greptime.v1.Affected" +
|
||||||
"Rows2Y\n\020GreptimeDatabase\022E\n\006Handle\022\034.gre" +
|
"Rows2\252\001\n\020GreptimeDatabase\022E\n\006Handle\022\034.gr" +
|
||||||
|
"eptime.v1.GreptimeRequest\032\035.greptime.v1." +
|
||||||
|
"GreptimeResponse\022O\n\016HandleRequests\022\034.gre" +
|
||||||
"ptime.v1.GreptimeRequest\032\035.greptime.v1.G" +
|
"ptime.v1.GreptimeRequest\032\035.greptime.v1.G" +
|
||||||
"reptimeResponseBQ\n\016io.greptime.v1B\010Datab" +
|
"reptimeResponse(\001BQ\n\016io.greptime.v1B\010Dat" +
|
||||||
"aseZ5github.com/GreptimeTeam/greptime-pr" +
|
"abaseZ5github.com/GreptimeTeam/greptime-" +
|
||||||
"oto/go/greptime/v1b\006proto3"
|
"proto/go/greptime/v1b\006proto3"
|
||||||
};
|
};
|
||||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
.internalBuildGeneratedFileFrom(descriptorData,
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import "greptime/v1/column.proto";
|
|||||||
|
|
||||||
service GreptimeDatabase {
|
service GreptimeDatabase {
|
||||||
rpc Handle(GreptimeRequest) returns (GreptimeResponse);
|
rpc Handle(GreptimeRequest) returns (GreptimeResponse);
|
||||||
|
|
||||||
|
rpc HandleRequests(stream GreptimeRequest) returns (GreptimeResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message RequestHeader {
|
message RequestHeader {
|
||||||
|
|||||||
Reference in New Issue
Block a user