diff --git a/dist/csharp/PluginService.cs b/dist/csharp/PluginService.cs index 7575ed0..9d66455 100644 --- a/dist/csharp/PluginService.cs +++ b/dist/csharp/PluginService.cs @@ -26,10 +26,12 @@ static PluginServiceReflection() { string.Concat( "Ch1zZXJ2aWNlcy9wbHVnaW5fc2VydmljZS5wcm90bxIEZ3JwYxobZW50aXR5", "L3BsdWdpbl9yZXF1ZXN0LnByb3RvGhVlbnRpdHkvcmVzcG9uc2UucHJvdG8a", - "G2VudGl0eS9zdHJlYW1fbWVzc2FnZS5wcm90bzJ9Cg1QbHVnaW5TZXJ2aWNl", - "EjEKCFJlZ2lzdGVyEhMuZ3JwYy5QbHVnaW5SZXF1ZXN0Gg4uZ3JwYy5SZXNw", - "b25zZSIAEjkKCVN1YnNjcmliZRITLmdycGMuUGx1Z2luUmVxdWVzdBoTLmdy", - "cGMuU3RyZWFtTWVzc2FnZSIAMAFCCFoGLjtncnBjYgZwcm90bzM=")); + "G2VudGl0eS9zdHJlYW1fbWVzc2FnZS5wcm90bzK2AQoNUGx1Z2luU2Vydmlj", + "ZRIxCghSZWdpc3RlchITLmdycGMuUGx1Z2luUmVxdWVzdBoOLmdycGMuUmVz", + "cG9uc2UiABI5CglTdWJzY3JpYmUSEy5ncnBjLlBsdWdpblJlcXVlc3QaEy5n", + "cnBjLlN0cmVhbU1lc3NhZ2UiADABEjcKB1JlcXVlc3QSEy5ncnBjLlN0cmVh", + "bU1lc3NhZ2UaEy5ncnBjLlBsdWdpblJlcXVlc3QiACgBQghaBi47Z3JwY2IG", + "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Grpc.PluginRequestReflection.Descriptor, global::Grpc.ResponseReflection.Descriptor, global::Grpc.StreamMessageReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, null)); diff --git a/dist/java/grpc/PluginServiceOuterClass.java b/dist/java/grpc/PluginServiceOuterClass.java index e976a72..2eb2e2f 100644 --- a/dist/java/grpc/PluginServiceOuterClass.java +++ b/dist/java/grpc/PluginServiceOuterClass.java @@ -25,11 +25,13 @@ public static void registerAllExtensions( java.lang.String[] descriptorData = { "\n\035services/plugin_service.proto\022\004grpc\032\033e" + "ntity/plugin_request.proto\032\025entity/respo" + - "nse.proto\032\033entity/stream_message.proto2}" + - "\n\rPluginService\0221\n\010Register\022\023.grpc.Plugi" + - "nRequest\032\016.grpc.Response\"\000\0229\n\tSubscribe\022" + - "\023.grpc.PluginRequest\032\023.grpc.StreamMessag" + - "e\"\0000\001B\010Z\006.;grpcb\006proto3" + "nse.proto\032\033entity/stream_message.proto2\266" + + "\001\n\rPluginService\0221\n\010Register\022\023.grpc.Plug" + + "inRequest\032\016.grpc.Response\"\000\0229\n\tSubscribe" + + "\022\023.grpc.PluginRequest\032\023.grpc.StreamMessa" + + "ge\"\0000\001\0227\n\007Request\022\023.grpc.StreamMessage\032\023" + + ".grpc.PluginRequest\"\000(\001B\010Z\006.;grpcb\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/dist/php/GPBMetadata/Services/PluginService.php b/dist/php/GPBMetadata/Services/PluginService.php index d8d7b43..7593b2a 100644 Binary files a/dist/php/GPBMetadata/Services/PluginService.php and b/dist/php/GPBMetadata/Services/PluginService.php differ diff --git a/dist/python/services/plugin_service_pb2.py b/dist/python/services/plugin_service_pb2.py index 9a680a7..f11dbb0 100644 --- a/dist/python/services/plugin_service_pb2.py +++ b/dist/python/services/plugin_service_pb2.py @@ -22,7 +22,7 @@ syntax='proto3', serialized_options=b'Z\006.;grpc', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x1dservices/plugin_service.proto\x12\x04grpc\x1a\x1b\x65ntity/plugin_request.proto\x1a\x15\x65ntity/response.proto\x1a\x1b\x65ntity/stream_message.proto2}\n\rPluginService\x12\x31\n\x08Register\x12\x13.grpc.PluginRequest\x1a\x0e.grpc.Response\"\x00\x12\x39\n\tSubscribe\x12\x13.grpc.PluginRequest\x1a\x13.grpc.StreamMessage\"\x00\x30\x01\x42\x08Z\x06.;grpcb\x06proto3' + serialized_pb=b'\n\x1dservices/plugin_service.proto\x12\x04grpc\x1a\x1b\x65ntity/plugin_request.proto\x1a\x15\x65ntity/response.proto\x1a\x1b\x65ntity/stream_message.proto2\xb6\x01\n\rPluginService\x12\x31\n\x08Register\x12\x13.grpc.PluginRequest\x1a\x0e.grpc.Response\"\x00\x12\x39\n\tSubscribe\x12\x13.grpc.PluginRequest\x1a\x13.grpc.StreamMessage\"\x00\x30\x01\x12\x37\n\x07Request\x12\x13.grpc.StreamMessage\x1a\x13.grpc.PluginRequest\"\x00(\x01\x42\x08Z\x06.;grpcb\x06proto3' , dependencies=[entity_dot_plugin__request__pb2.DESCRIPTOR,entity_dot_response__pb2.DESCRIPTOR,entity_dot_stream__message__pb2.DESCRIPTOR,]) @@ -40,8 +40,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=120, - serialized_end=245, + serialized_start=121, + serialized_end=303, methods=[ _descriptor.MethodDescriptor( name='Register', @@ -63,6 +63,16 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='Request', + full_name='grpc.PluginService.Request', + index=2, + containing_service=None, + input_type=entity_dot_stream__message__pb2._STREAMMESSAGE, + output_type=entity_dot_plugin__request__pb2._PLUGINREQUEST, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), ]) _sym_db.RegisterServiceDescriptor(_PLUGINSERVICE) diff --git a/dist/python/services/plugin_service_pb2_grpc.py b/dist/python/services/plugin_service_pb2_grpc.py index 7f627fb..f30425b 100644 --- a/dist/python/services/plugin_service_pb2_grpc.py +++ b/dist/python/services/plugin_service_pb2_grpc.py @@ -26,6 +26,11 @@ def __init__(self, channel): request_serializer=entity_dot_plugin__request__pb2.PluginRequest.SerializeToString, response_deserializer=entity_dot_stream__message__pb2.StreamMessage.FromString, ) + self.Request = channel.stream_unary( + '/grpc.PluginService/Request', + request_serializer=entity_dot_stream__message__pb2.StreamMessage.SerializeToString, + response_deserializer=entity_dot_plugin__request__pb2.PluginRequest.FromString, + ) class PluginServiceServicer(object): @@ -43,6 +48,12 @@ def Subscribe(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def Request(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_PluginServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -56,6 +67,11 @@ def add_PluginServiceServicer_to_server(servicer, server): request_deserializer=entity_dot_plugin__request__pb2.PluginRequest.FromString, response_serializer=entity_dot_stream__message__pb2.StreamMessage.SerializeToString, ), + 'Request': grpc.stream_unary_rpc_method_handler( + servicer.Request, + request_deserializer=entity_dot_stream__message__pb2.StreamMessage.FromString, + response_serializer=entity_dot_plugin__request__pb2.PluginRequest.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'grpc.PluginService', rpc_method_handlers) @@ -99,3 +115,20 @@ def Subscribe(request, entity_dot_stream__message__pb2.StreamMessage.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Request(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/grpc.PluginService/Request', + entity_dot_stream__message__pb2.StreamMessage.SerializeToString, + entity_dot_plugin__request__pb2.PluginRequest.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/plugin_service.pb.go b/plugin_service.pb.go index afbbc6d..3388420 100644 --- a/plugin_service.pb.go +++ b/plugin_service.pb.go @@ -34,30 +34,36 @@ var file_services_plugin_service_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x7d, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x09, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xb6, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x09, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x37, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x00, 0x28, 0x01, 0x42, + 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var file_services_plugin_service_proto_goTypes = []interface{}{ (*PluginRequest)(nil), // 0: grpc.PluginRequest - (*Response)(nil), // 1: grpc.Response - (*StreamMessage)(nil), // 2: grpc.StreamMessage + (*StreamMessage)(nil), // 1: grpc.StreamMessage + (*Response)(nil), // 2: grpc.Response } var file_services_plugin_service_proto_depIdxs = []int32{ 0, // 0: grpc.PluginService.Register:input_type -> grpc.PluginRequest 0, // 1: grpc.PluginService.Subscribe:input_type -> grpc.PluginRequest - 1, // 2: grpc.PluginService.Register:output_type -> grpc.Response - 2, // 3: grpc.PluginService.Subscribe:output_type -> grpc.StreamMessage - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type + 1, // 2: grpc.PluginService.Request:input_type -> grpc.StreamMessage + 2, // 3: grpc.PluginService.Register:output_type -> grpc.Response + 1, // 4: grpc.PluginService.Subscribe:output_type -> grpc.StreamMessage + 0, // 5: grpc.PluginService.Request:output_type -> grpc.PluginRequest + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/plugin_service_grpc.pb.go b/plugin_service_grpc.pb.go index 4a651a7..6848679 100644 --- a/plugin_service_grpc.pb.go +++ b/plugin_service_grpc.pb.go @@ -19,6 +19,7 @@ const _ = grpc.SupportPackageIsVersion7 type PluginServiceClient interface { Register(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (*Response, error) Subscribe(ctx context.Context, in *PluginRequest, opts ...grpc.CallOption) (PluginService_SubscribeClient, error) + Request(ctx context.Context, opts ...grpc.CallOption) (PluginService_RequestClient, error) } type pluginServiceClient struct { @@ -70,12 +71,47 @@ func (x *pluginServiceSubscribeClient) Recv() (*StreamMessage, error) { return m, nil } +func (c *pluginServiceClient) Request(ctx context.Context, opts ...grpc.CallOption) (PluginService_RequestClient, error) { + stream, err := c.cc.NewStream(ctx, &_PluginService_serviceDesc.Streams[1], "/grpc.PluginService/Request", opts...) + if err != nil { + return nil, err + } + x := &pluginServiceRequestClient{stream} + return x, nil +} + +type PluginService_RequestClient interface { + Send(*StreamMessage) error + CloseAndRecv() (*PluginRequest, error) + grpc.ClientStream +} + +type pluginServiceRequestClient struct { + grpc.ClientStream +} + +func (x *pluginServiceRequestClient) Send(m *StreamMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *pluginServiceRequestClient) CloseAndRecv() (*PluginRequest, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(PluginRequest) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // PluginServiceServer is the server API for PluginService service. // All implementations must embed UnimplementedPluginServiceServer // for forward compatibility type PluginServiceServer interface { Register(context.Context, *PluginRequest) (*Response, error) Subscribe(*PluginRequest, PluginService_SubscribeServer) error + Request(PluginService_RequestServer) error mustEmbedUnimplementedPluginServiceServer() } @@ -89,6 +125,9 @@ func (UnimplementedPluginServiceServer) Register(context.Context, *PluginRequest func (UnimplementedPluginServiceServer) Subscribe(*PluginRequest, PluginService_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } +func (UnimplementedPluginServiceServer) Request(PluginService_RequestServer) error { + return status.Errorf(codes.Unimplemented, "method Request not implemented") +} func (UnimplementedPluginServiceServer) mustEmbedUnimplementedPluginServiceServer() {} // UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. @@ -141,6 +180,32 @@ func (x *pluginServiceSubscribeServer) Send(m *StreamMessage) error { return x.ServerStream.SendMsg(m) } +func _PluginService_Request_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(PluginServiceServer).Request(&pluginServiceRequestServer{stream}) +} + +type PluginService_RequestServer interface { + SendAndClose(*PluginRequest) error + Recv() (*StreamMessage, error) + grpc.ServerStream +} + +type pluginServiceRequestServer struct { + grpc.ServerStream +} + +func (x *pluginServiceRequestServer) SendAndClose(m *PluginRequest) error { + return x.ServerStream.SendMsg(m) +} + +func (x *pluginServiceRequestServer) Recv() (*StreamMessage, error) { + m := new(StreamMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + var _PluginService_serviceDesc = grpc.ServiceDesc{ ServiceName: "grpc.PluginService", HandlerType: (*PluginServiceServer)(nil), @@ -156,6 +221,11 @@ var _PluginService_serviceDesc = grpc.ServiceDesc{ Handler: _PluginService_Subscribe_Handler, ServerStreams: true, }, + { + StreamName: "Request", + Handler: _PluginService_Request_Handler, + ClientStreams: true, + }, }, Metadata: "services/plugin_service.proto", }