def StreamStream( self, request: typing.Iterator[dummy_pb2.DummyRequest], context: grpc.ServicerContext, ) -> typing.Iterator[dummy_pb2.DummyReply]: for data in request: yield dummy_pb2.DummyReply(value=data.value.upper())
def UnaryStream( self, request: dummy_pb2.DummyRequest, context: grpc.ServicerContext, ) -> typing.Iterator[dummy_pb2.DummyReply]: for char in request.value: yield dummy_pb2.DummyReply(value=char)
def StreamUnary( self, request: typing.Iterator[dummy_pb2.DummyRequest], context: grpc.ServicerContext, ) -> dummy_pb2.DummyReply: return dummy_pb2.DummyReply(value="".join(data.value for data in request))
def UnaryUnary( self, request: dummy_pb2.DummyRequest, context: grpc.ServicerContext, ) -> dummy_pb2.DummyReply: return dummy_pb2.DummyReply(value=request.value[::-1])