Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
- import grpc
- from pilling.grpc.protos import echo_pb2 as pilling_dot_grpc_dot_protos_dot_echo__pb2
- class EchoStub(object):
- """Echo service
- """
- def __init__(self, channel):
- """Constructor.
- Args:
- channel: A grpc.Channel.
- """
- self.GetEcho = channel.unary_unary(
- '/Echo/GetEcho',
- request_serializer=pilling_dot_grpc_dot_protos_dot_echo__pb2.EchoRequest.SerializeToString,
- response_deserializer=pilling_dot_grpc_dot_protos_dot_echo__pb2.EchoReply.FromString,
- )
- class EchoServicer(object):
- """Echo service
- """
- def GetEcho(self, request, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
- def add_EchoServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'GetEcho': grpc.unary_unary_rpc_method_handler(
- servicer.GetEcho,
- request_deserializer=pilling_dot_grpc_dot_protos_dot_echo__pb2.EchoRequest.FromString,
- response_serializer=pilling_dot_grpc_dot_protos_dot_echo__pb2.EchoReply.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'Echo', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement