github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/bddtests/peer/events_pb2_grpc.py (about) 1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2 import grpc 3 from grpc.framework.common import cardinality 4 from grpc.framework.interfaces.face import utilities as face_utilities 5 6 import peer.events_pb2 as peer_dot_events__pb2 7 8 9 class EventsStub(object): 10 """Interface exported by the events server 11 """ 12 13 def __init__(self, channel): 14 """Constructor. 15 16 Args: 17 channel: A grpc.Channel. 18 """ 19 self.Chat = channel.stream_stream( 20 '/protos.Events/Chat', 21 request_serializer=peer_dot_events__pb2.Event.SerializeToString, 22 response_deserializer=peer_dot_events__pb2.Event.FromString, 23 ) 24 25 26 class EventsServicer(object): 27 """Interface exported by the events server 28 """ 29 30 def Chat(self, request_iterator, context): 31 """event chatting using Event 32 """ 33 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 34 context.set_details('Method not implemented!') 35 raise NotImplementedError('Method not implemented!') 36 37 38 def add_EventsServicer_to_server(servicer, server): 39 rpc_method_handlers = { 40 'Chat': grpc.stream_stream_rpc_method_handler( 41 servicer.Chat, 42 request_deserializer=peer_dot_events__pb2.Event.FromString, 43 response_serializer=peer_dot_events__pb2.Event.SerializeToString, 44 ), 45 } 46 generic_handler = grpc.method_handlers_generic_handler( 47 'protos.Events', rpc_method_handlers) 48 server.add_generic_rpc_handlers((generic_handler,))