async def say_hello_to_many(message_iterator: Stream[HelloRequest]) -> Stream[HelloReply]: requests = [] async for message in message_iterator: requests.append(message) name = requests[0].name for i in range(8): name += name yield HelloReply(message="Hello, {}".format(name))
def SayHelloToMany(self, request_iterator, context): requests = [] for request in request_iterator: requests.append(request) name = requests[0].name for i in range(8): name += name yield HelloReply(message='Hello, {}'.format(name))
def SayHelloToMany(self, messages, context): for message in messages: yield HelloReply(message=message.name[::-1])
def SayHello(self, message, context): return HelloReply(message=message.name[::-1])
async def say_hello_to_many(message: Stream[HelloRequest]) -> Stream[HelloReply]: yield HelloReply(message="Hello, world!")
async def SayHelloToMany(self, input_messages): async for _ in input_messages: pass yield HelloReply(message="Hello, world!")
async def SayHello(self, message): return HelloReply(message="Hello, " + message.name)
async def SayHelloToMany(self, input_messages): async for message in input_messages: await yield_(HelloReply(message=message.name))