github.com/craicoverflow/tyk@v2.9.6-rc3+incompatible/coprocess/bindings/python/coprocess_object_pb2_grpc.py (about) 1 # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2 import grpc 3 4 import coprocess_object_pb2 as coprocess__object__pb2 5 6 7 class DispatcherStub(object): 8 # missing associated documentation comment in .proto file 9 pass 10 11 def __init__(self, channel): 12 """Constructor. 13 14 Args: 15 channel: A grpc.Channel. 16 """ 17 self.Dispatch = channel.unary_unary( 18 '/coprocess.Dispatcher/Dispatch', 19 request_serializer=coprocess__object__pb2.Object.SerializeToString, 20 response_deserializer=coprocess__object__pb2.Object.FromString, 21 ) 22 self.DispatchEvent = channel.unary_unary( 23 '/coprocess.Dispatcher/DispatchEvent', 24 request_serializer=coprocess__object__pb2.Event.SerializeToString, 25 response_deserializer=coprocess__object__pb2.EventReply.FromString, 26 ) 27 28 29 class DispatcherServicer(object): 30 # missing associated documentation comment in .proto file 31 pass 32 33 def Dispatch(self, request, context): 34 # missing associated documentation comment in .proto file 35 pass 36 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 37 context.set_details('Method not implemented!') 38 raise NotImplementedError('Method not implemented!') 39 40 def DispatchEvent(self, request, context): 41 # missing associated documentation comment in .proto file 42 pass 43 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 44 context.set_details('Method not implemented!') 45 raise NotImplementedError('Method not implemented!') 46 47 48 def add_DispatcherServicer_to_server(servicer, server): 49 rpc_method_handlers = { 50 'Dispatch': grpc.unary_unary_rpc_method_handler( 51 servicer.Dispatch, 52 request_deserializer=coprocess__object__pb2.Object.FromString, 53 response_serializer=coprocess__object__pb2.Object.SerializeToString, 54 ), 55 'DispatchEvent': grpc.unary_unary_rpc_method_handler( 56 servicer.DispatchEvent, 57 request_deserializer=coprocess__object__pb2.Event.FromString, 58 response_serializer=coprocess__object__pb2.EventReply.SerializeToString, 59 ), 60 } 61 generic_handler = grpc.method_handlers_generic_handler( 62 'coprocess.Dispatcher', rpc_method_handlers) 63 server.add_generic_rpc_handlers((generic_handler,))