|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
# Copyright 2015 gRPC authors. |
|
|
|
|
# Copyright 2020 gRPC authors. |
|
|
|
|
# |
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
# you may not use this file except in compliance with the License. |
|
|
|
@ -11,9 +11,8 @@ |
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
# See the License for the specific language governing permissions and |
|
|
|
|
# limitations under the License. |
|
|
|
|
"""The Python implementation of the GRPC helloworld.Greeter server.""" |
|
|
|
|
"""The Python AsyncIO implementation of the GRPC helloworld.Greeter server.""" |
|
|
|
|
|
|
|
|
|
from concurrent import futures |
|
|
|
|
import logging |
|
|
|
|
import asyncio |
|
|
|
|
import grpc |
|
|
|
@ -24,7 +23,7 @@ import helloworld_pb2_grpc |
|
|
|
|
|
|
|
|
|
class Greeter(helloworld_pb2_grpc.GreeterServicer): |
|
|
|
|
|
|
|
|
|
def SayHello(self, request, context): |
|
|
|
|
async def SayHello(self, request, context): |
|
|
|
|
return helloworld_pb2.HelloReply(message='Hello, %s!' % request.name) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|