def add_SaiyaServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Robot2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Robot2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'Web2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Web2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'Mobile2Saiya': grpc.stream_stream_rpc_method_handler(
          servicer.Mobile2Saiya,
          request_deserializer=crazy__rtc__pb2.CrazyMsg.FromString,
          response_serializer=crazy__rtc__pb2.CrazyMsg.SerializeToString,
      ),
      'GetDevList': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevList,
          request_deserializer=crazy__rtc__pb2.EmailReq.FromString,
          response_serializer=crazy__rtc__pb2.DeviceList.SerializeToString,
      ),
      'GetDevInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevInfo,
          request_deserializer=crazy__rtc__pb2.DevReq.FromString,
          response_serializer=crazy__rtc__pb2.DeviceInfo.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'crazy_rtc.Saiya', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_RouteGuideServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetFeature': grpc.unary_unary_rpc_method_handler(
          servicer.GetFeature,
          request_deserializer=route__guide__pb2.Point.FromString,
          response_serializer=route__guide__pb2.Feature.SerializeToString,
      ),
      'ListFeatures': grpc.unary_stream_rpc_method_handler(
          servicer.ListFeatures,
          request_deserializer=route__guide__pb2.Rectangle.FromString,
          response_serializer=route__guide__pb2.Feature.SerializeToString,
      ),
      'RecordRoute': grpc.stream_unary_rpc_method_handler(
          servicer.RecordRoute,
          request_deserializer=route__guide__pb2.Point.FromString,
          response_serializer=route__guide__pb2.RouteSummary.SerializeToString,
      ),
      'RouteChat': grpc.stream_stream_rpc_method_handler(
          servicer.RouteChat,
          request_deserializer=route__guide__pb2.RouteNote.FromString,
          response_serializer=route__guide__pb2.RouteNote.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'routeguide.RouteGuide', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #3
0
def add_AtomicBroadcastServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Broadcast': grpc.stream_stream_rpc_method_handler(
          servicer.Broadcast,
          request_deserializer=BroadcastMessage.FromString,
          response_serializer=BroadcastResponse.SerializeToString,
      ),
      'Deliver': grpc.stream_stream_rpc_method_handler(
          servicer.Deliver,
          request_deserializer=DeliverUpdate.FromString,
          response_serializer=DeliverResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'atomicbroadcast.AtomicBroadcast', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #4
0
  def _create_server(self, config):
    if config.async_server_threads == 0:
      # This is the default concurrent.futures thread pool size, but
      # None doesn't seem to work
      server_threads = multiprocessing.cpu_count() * 5
    else:
      server_threads = config.async_server_threads
    server = grpc.server((), futures.ThreadPoolExecutor(
        max_workers=server_threads))
    if config.server_type == control_pb2.ASYNC_SERVER:
      servicer = benchmark_server.BenchmarkServer()
      services_pb2.add_BenchmarkServiceServicer_to_server(servicer, server)
    elif config.server_type == control_pb2.ASYNC_GENERIC_SERVER:
      resp_size = config.payload_config.bytebuf_params.resp_size
      servicer = benchmark_server.GenericBenchmarkServer(resp_size)
      method_implementations = {
          'StreamingCall':
          grpc.stream_stream_rpc_method_handler(servicer.StreamingCall),
          'UnaryCall':
          grpc.unary_unary_rpc_method_handler(servicer.UnaryCall),
      }
      handler = grpc.method_handlers_generic_handler(
          'grpc.testing.BenchmarkService', method_implementations)
      server.add_generic_rpc_handlers((handler,))
    else:
      raise Exception('Unsupported server type {}'.format(config.server_type))

    if config.HasField('security_params'):  # Use SSL
      server_creds = grpc.ssl_server_credentials(
          ((resources.private_key(), resources.certificate_chain()),))
      port = server.add_secure_port('[::]:{}'.format(config.port), server_creds)
    else:
      port = server.add_insecure_port('[::]:{}'.format(config.port))

    return (server, port)
Exemple #5
0
def add_AtomicBroadcastServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Broadcast': grpc.stream_stream_rpc_method_handler(
          servicer.Broadcast,
          request_deserializer=common_dot_common__pb2.Envelope.FromString,
          response_serializer=orderer_dot_ab__pb2.BroadcastResponse.SerializeToString,
      ),
      'Deliver': grpc.stream_stream_rpc_method_handler(
          servicer.Deliver,
          request_deserializer=common_dot_common__pb2.Envelope.FromString,
          response_serializer=orderer_dot_ab__pb2.DeliverResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'orderer.AtomicBroadcast', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #6
0
def add_DemoServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'HelloOnce': grpc.unary_unary_rpc_method_handler(
          servicer.HelloOnce,
          request_deserializer=demo__pb2.HelloRequest.FromString,
          response_serializer=demo__pb2.HelloResponse.SerializeToString,
      ),
      'LotsOfReplies': grpc.unary_stream_rpc_method_handler(
          servicer.LotsOfReplies,
          request_deserializer=demo__pb2.HelloRequest.FromString,
          response_serializer=demo__pb2.HelloResponse.SerializeToString,
      ),
      'LotsOfHello': grpc.stream_unary_rpc_method_handler(
          servicer.LotsOfHello,
          request_deserializer=demo__pb2.HelloRequest.FromString,
          response_serializer=demo__pb2.HelloResponse.SerializeToString,
      ),
      'RepeatBot': grpc.stream_stream_rpc_method_handler(
          servicer.RepeatBot,
          request_deserializer=demo__pb2.HelloRequest.FromString,
          response_serializer=demo__pb2.HelloResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'helloworld.Demo', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
 def service(self, handler_call_details):
     if handler_call_details.method == _SUCCESSFUL_UNARY_UNARY:
         return grpc.unary_unary_rpc_method_handler(_successful_unary_unary)
     elif handler_call_details.method == _FAILED_UNARY_UNARY:
         return grpc.unary_unary_rpc_method_handler(_failed_unary_unary)
     elif handler_call_details.method == _SUCCESSFUL_STREAM_STREAM:
         return grpc.stream_stream_rpc_method_handler(
             _successful_stream_stream)
     else:
         return None
def add_BeamFnDataServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Data': grpc.stream_stream_rpc_method_handler(
          servicer.Data,
          request_deserializer=beam__fn__api__pb2.Elements.FromString,
          response_serializer=beam__fn__api__pb2.Elements.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'org.apache.beam.fn.v1.BeamFnData', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_PiCalculatorServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Calc': grpc.stream_stream_rpc_method_handler(
          servicer.Calc,
          request_deserializer=pi__pb2.PiRequest.FromString,
          response_serializer=pi__pb2.PiResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'pi.PiCalculator', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_BeamFnStateServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'State': grpc.stream_stream_rpc_method_handler(
          servicer.State,
          request_deserializer=beam__fn__api__pb2.StateRequest.FromString,
          response_serializer=beam__fn__api__pb2.StateResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'org.apache.beam.fn.v1.BeamFnState', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_BeamFnLoggingServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Logging': grpc.stream_stream_rpc_method_handler(
          servicer.Logging,
          request_deserializer=beam__fn__api__pb2.LogEntry.List.FromString,
          response_serializer=beam__fn__api__pb2.LogControl.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'org.apache.beam.fn.v1.BeamFnLogging', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_BeamFnControlServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Control': grpc.stream_stream_rpc_method_handler(
          servicer.Control,
          request_deserializer=beam__fn__api__pb2.InstructionResponse.FromString,
          response_serializer=beam__fn__api__pb2.InstructionRequest.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'org.apache.beam.fn.v1.BeamFnControl', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #13
0
def add_NodeServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'MessageLoop': grpc.stream_stream_rpc_method_handler(
          servicer.MessageLoop,
          request_deserializer=model__pb2.ClientMsg.FromString,
          response_serializer=model__pb2.ServerMsg.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'pbx.Node', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #14
0
 def service(self, handler_call_details):
     if handler_call_details.method == _ABORT:
         return grpc.unary_unary_rpc_method_handler(abort_unary_unary)
     elif handler_call_details.method == _ABORT_WITH_STATUS:
         return grpc.unary_unary_rpc_method_handler(
             abort_with_status_unary_unary)
     elif handler_call_details.method == _INVALID_CODE:
         return grpc.stream_stream_rpc_method_handler(
             invalid_code_unary_unary)
     else:
         return None
Exemple #15
0
def add_EventsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Chat': grpc.stream_stream_rpc_method_handler(
          servicer.Chat,
          request_deserializer=peer_dot_events__pb2.Event.FromString,
          response_serializer=peer_dot_events__pb2.Event.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'protos.Events', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_EventListenerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SendEvents': grpc.stream_stream_rpc_method_handler(
          servicer.SendEvents,
          request_deserializer=tensorflow_dot_core_dot_util_dot_event__pb2.Event.FromString,
          response_serializer=tensorflow_dot_core_dot_debug_dot_debug__service__pb2.EventReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.EventListener', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #17
0
def add_ChaincodeSupportServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Register': grpc.stream_stream_rpc_method_handler(
          servicer.Register,
          request_deserializer=ChaincodeMessage.FromString,
          response_serializer=ChaincodeMessage.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'protos.ChaincodeSupport', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_StreamingVideoIntelligenceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "StreamingAnnotateVideo": grpc.stream_stream_rpc_method_handler(
            servicer.StreamingAnnotateVideo,
            request_deserializer=google_dot_cloud_dot_videointelligence__v1p3beta1_dot_proto_dot_video__intelligence__pb2.StreamingAnnotateVideoRequest.FromString,
            response_serializer=google_dot_cloud_dot_videointelligence__v1p3beta1_dot_proto_dot_video__intelligence__pb2.StreamingAnnotateVideoResponse.SerializeToString,
        )
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.videointelligence.v1p3beta1.StreamingVideoIntelligenceService",
        rpc_method_handlers,
    )
    server.add_generic_rpc_handlers((generic_handler,))
def _generic_handler(servicer):
  method_handlers = {
      _UNARY_UNARY: grpc.unary_unary_rpc_method_handler(
          servicer.unary_unary, request_deserializer=_REQUEST_DESERIALIZER,
          response_serializer=_RESPONSE_SERIALIZER),
      _UNARY_STREAM: grpc.unary_stream_rpc_method_handler(
          servicer.unary_stream),
      _STREAM_UNARY: grpc.stream_unary_rpc_method_handler(
          servicer.stream_unary),
      _STREAM_STREAM: grpc.stream_stream_rpc_method_handler(
          servicer.stream_stream, request_deserializer=_REQUEST_DESERIALIZER,
          response_serializer=_RESPONSE_SERIALIZER),
  }
  return grpc.method_handlers_generic_handler(_SERVICE, method_handlers)
def add_BeamFnWorkerStatusServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'WorkerStatus':
        grpc.stream_stream_rpc_method_handler(
            servicer.WorkerStatus,
            request_deserializer=beam__fn__api__pb2.WorkerStatusResponse.
            FromString,
            response_serializer=beam__fn__api__pb2.WorkerStatusRequest.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'org.apache.beam.model.fn_execution.v1.BeamFnWorkerStatus',
        rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #21
0
def add_ArtifactStagingServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ReverseArtifactRetrievalService':
        grpc.stream_stream_rpc_method_handler(
            servicer.ReverseArtifactRetrievalService,
            request_deserializer=beam__artifact__api__pb2.
            ArtifactResponseWrapper.FromString,
            response_serializer=beam__artifact__api__pb2.
            ArtifactRequestWrapper.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'org.apache.beam.model.job_management.v1.ArtifactStagingService',
        rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #22
0
 def add_ConnectorServicer_to_server(servicer, server):
     rpc_method_handlers = {
         'GetCapabilities':
         grpc.unary_unary_rpc_method_handler(
             servicer.GetCapabilities,
             request_deserializer=Empty.FromString,
             response_serializer=Capabilities.SerializeToString,
         ),
         'ExecuteFunction':
         grpc.stream_stream_rpc_method_handler(
             servicer.ExecuteFunction,
             request_deserializer=BundledRows.FromString,
             response_serializer=BundledRows.SerializeToString,
         ),
         'EvaluateScript':
         grpc.stream_stream_rpc_method_handler(
             servicer.EvaluateScript,
             request_deserializer=BundledRows.FromString,
             response_serializer=BundledRows.SerializeToString,
         ),
     }
     generic_handler = grpc.method_handlers_generic_handler(
         'qlik.sse.Connector', rpc_method_handlers)
     server.add_generic_rpc_handlers((generic_handler, ))
Exemple #23
0
 def __init__(self):
     self._routing_table = {
         _TEST_CLIENT_TO_SERVER:
         grpc.unary_unary_rpc_method_handler(self._test_client_to_server),
         _TEST_SERVER_TO_CLIENT:
         grpc.unary_unary_rpc_method_handler(self._test_server_to_client),
         _TEST_TRAILING_METADATA:
         grpc.unary_unary_rpc_method_handler(self._test_trailing_metadata),
         _TEST_UNARY_STREAM:
         grpc.unary_stream_rpc_method_handler(self._test_unary_stream),
         _TEST_STREAM_UNARY:
         grpc.stream_unary_rpc_method_handler(self._test_stream_unary),
         _TEST_STREAM_STREAM:
         grpc.stream_stream_rpc_method_handler(self._test_stream_stream),
     }
Exemple #24
0
def add_SmartHTTPServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'InfoRefsUploadPack':
        grpc.unary_stream_rpc_method_handler(
            servicer.InfoRefsUploadPack,
            request_deserializer=smarthttp__pb2.InfoRefsRequest.FromString,
            response_serializer=smarthttp__pb2.InfoRefsResponse.
            SerializeToString,
        ),
        'InfoRefsReceivePack':
        grpc.unary_stream_rpc_method_handler(
            servicer.InfoRefsReceivePack,
            request_deserializer=smarthttp__pb2.InfoRefsRequest.FromString,
            response_serializer=smarthttp__pb2.InfoRefsResponse.
            SerializeToString,
        ),
        'PostUploadPack':
        grpc.stream_stream_rpc_method_handler(
            servicer.PostUploadPack,
            request_deserializer=smarthttp__pb2.PostUploadPackRequest.
            FromString,
            response_serializer=smarthttp__pb2.PostUploadPackResponse.
            SerializeToString,
        ),
        'PostReceivePack':
        grpc.stream_stream_rpc_method_handler(
            servicer.PostReceivePack,
            request_deserializer=smarthttp__pb2.PostReceivePackRequest.
            FromString,
            response_serializer=smarthttp__pb2.PostReceivePackResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'gitaly.SmartHTTPService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_BeamFnControlServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Control':
        grpc.stream_stream_rpc_method_handler(
            servicer.Control,
            request_deserializer=beam__fn__api__pb2.InstructionResponse.
            FromString,
            response_serializer=beam__fn__api__pb2.InstructionRequest.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'org.apache.beam.model.fn_execution.v1.BeamFnControl',
        rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_WatchServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Watch':
        grpc.stream_stream_rpc_method_handler(
            servicer.Watch,
            request_deserializer=
            etcd_dot_etcdserver_dot_etcdserverpb_dot_rpc__pb2.WatchRequest.
            FromString,
            response_serializer=etcd_dot_etcdserver_dot_etcdserverpb_dot_rpc__pb2
            .WatchResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'etcdserverpb.Watch', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #27
0
def add_TestServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'NormalMethod':
        grpc.unary_unary_rpc_method_handler(
            servicer.NormalMethod,
            request_deserializer=service__pb2.StandardRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
        'StreamMethod':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamMethod,
            request_deserializer=service__pb2.StreamRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
        'StreamInputMethod':
        grpc.stream_unary_rpc_method_handler(
            servicer.StreamInputMethod,
            request_deserializer=service__pb2.StandardRequest.FromString,
            response_serializer=service__pb2.StreamReply.SerializeToString,
        ),
        'StreamStreamMethod':
        grpc.stream_stream_rpc_method_handler(
            servicer.StreamStreamMethod,
            request_deserializer=service__pb2.StandardRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
        'DelayedMethod':
        grpc.unary_unary_rpc_method_handler(
            servicer.DelayedMethod,
            request_deserializer=service__pb2.StandardRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
        'ExceptionMethod':
        grpc.unary_unary_rpc_method_handler(
            servicer.ExceptionMethod,
            request_deserializer=service__pb2.StandardRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
        'DelayedStream':
        grpc.unary_stream_rpc_method_handler(
            servicer.DelayedStream,
            request_deserializer=service__pb2.StreamRequest.FromString,
            response_serializer=service__pb2.StandardReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'TestService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_DataHashServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'get_image':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_image,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Image.SerializeToString,
        ),
        'hash_md5':
        grpc.unary_unary_rpc_method_handler(
            servicer.hash_md5,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
        'hash_sha256':
        grpc.unary_unary_rpc_method_handler(
            servicer.hash_sha256,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
        'hello':
        grpc.unary_unary_rpc_method_handler(
            servicer.hello,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
        'stream_text':
        grpc.unary_stream_rpc_method_handler(
            servicer.stream_text,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
        'input_stream':
        grpc.stream_unary_rpc_method_handler(
            servicer.input_stream,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
        'dual_stream':
        grpc.stream_stream_rpc_method_handler(
            servicer.dual_stream,
            request_deserializer=datahash__pb2.Text.FromString,
            response_serializer=datahash__pb2.Text.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'DataHash', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_HelloServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'World': grpc.unary_unary_rpc_method_handler(
          servicer.World,
          request_deserializer=hello__pb2.Name.FromString,
          response_serializer=hello__pb2.Welcome.SerializeToString,
      ),
      'Person': grpc.stream_stream_rpc_method_handler(
          servicer.Person,
          request_deserializer=hello__pb2.Name.FromString,
          response_serializer=hello__pb2.Welcome.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Hello', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #30
0
 def add_GreeterServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'SayHello': grpc.unary_unary_rpc_method_handler(
           servicer.SayHello,
           request_deserializer=HelloRequest.FromString,
           response_serializer=HelloReply.SerializeToString,
       ),
       'ManyHellos': grpc.stream_stream_rpc_method_handler(
           servicer.ManyHellos,
           request_deserializer=HelloRequest.FromString,
           response_serializer=HelloReply.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'srecon.Greeter', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
Exemple #31
0
def add_PlatformServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetPlatformServer': grpc.unary_unary_rpc_method_handler(
          servicer.GetPlatformServer,
          request_deserializer=control__pb2.ClientIdentification.FromString,
          response_serializer=control__pb2.PlatformInfo.SerializeToString,
      ),
      'OpenStream': grpc.stream_stream_rpc_method_handler(
          servicer.OpenStream,
          request_deserializer=control__pb2.PlatformInboundInstruction.FromString,
          response_serializer=control__pb2.PlatformOutboundInstruction.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'io.axoniq.axonserver.grpc.control.PlatformService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #32
0
def add_GossipServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GossipStream': grpc.stream_stream_rpc_method_handler(
          servicer.GossipStream,
          request_deserializer=gossip_dot_message__pb2.Envelope.FromString,
          response_serializer=gossip_dot_message__pb2.Envelope.SerializeToString,
      ),
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=gossip_dot_message__pb2.Empty.FromString,
          response_serializer=gossip_dot_message__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'gossip.Gossip', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #33
0
def add_CollectionConfigServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'WaitForProbeConfig': grpc.stream_stream_rpc_method_handler(
                    servicer.WaitForProbeConfig,
                    request_deserializer=zenoss_dot_cloud_dot_collection__cfg__pb2.WaitForProbeConfigResponse.FromString,
                    response_serializer=zenoss_dot_cloud_dot_collection__cfg__pb2.WaitForProbeConfigRequest.SerializeToString,
            ),
            'GetConfigStream': grpc.unary_stream_rpc_method_handler(
                    servicer.GetConfigStream,
                    request_deserializer=zenoss_dot_cloud_dot_collection__cfg__pb2.GetConfigStreamRequest.FromString,
                    response_serializer=zenoss_dot_cloud_dot_collection__cfg__pb2.GetConfigStreamResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'zenoss.cloud.collection_cfg.CollectionConfigService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #34
0
def add_GreeterServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SayHello': grpc.unary_unary_rpc_method_handler(
                    servicer.SayHello,
                    request_deserializer=helloworld__pb2.HelloRequest.FromString,
                    response_serializer=helloworld__pb2.HelloReply.SerializeToString,
            ),
            'SayHelloStream': grpc.stream_stream_rpc_method_handler(
                    servicer.SayHelloStream,
                    request_deserializer=helloworld__pb2.HelloRequest.FromString,
                    response_serializer=helloworld__pb2.HelloReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'proto.Greeter', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #35
0
 def add_PublishBuildEventServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'PublishLifecycleEvent': grpc.unary_unary_rpc_method_handler(
           servicer.PublishLifecycleEvent,
           request_deserializer=PublishLifecycleEventRequest.FromString,
           response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
       ),
       'PublishBuildToolEventStream': grpc.stream_stream_rpc_method_handler(
           servicer.PublishBuildToolEventStream,
           request_deserializer=OrderedBuildEvent.FromString,
           response_serializer=PublishBuildToolEventStreamResponse.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'google.devtools.build.v1.PublishBuildEvent', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_RecognizerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'RecognizeStreaming':
        grpc.stream_stream_rpc_method_handler(
            servicer.RecognizeStreaming,
            request_deserializer=
            yandex_dot_cloud_dot_ai_dot_stt_dot_v3_dot_stt__pb2.
            StreamingRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_ai_dot_stt_dot_v3_dot_stt__pb2.
            StreamingResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'speechkit.stt.v3.Recognizer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #37
0
def add_SttServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'LongRunningRecognize': grpc.unary_unary_rpc_method_handler(
                    servicer.LongRunningRecognize,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_stt_dot_v2_dot_stt__service__pb2.LongRunningRecognitionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'StreamingRecognize': grpc.stream_stream_rpc_method_handler(
                    servicer.StreamingRecognize,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_stt_dot_v2_dot_stt__service__pb2.StreamingRecognitionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_stt_dot_v2_dot_stt__service__pb2.StreamingRecognitionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.ai.stt.v2.SttService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #38
0
def add_SpeechRecognitionServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetListOfSpeechRecognitionModels': grpc.unary_unary_rpc_method_handler(
          servicer.GetListOfSpeechRecognitionModels,
          request_deserializer=AsrService__pb2.Auth.FromString,
          response_serializer=base__pb2.ListOfModels.SerializeToString,
      ),
      'RecognizeSpeech': grpc.stream_stream_rpc_method_handler(
          servicer.RecognizeSpeech,
          request_deserializer=AsrService__pb2.RecognizeRequest.FromString,
          response_serializer=AsrService__pb2.SpeechRecognitionResults.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Speechpro.Cloud.ASR.SpeechRecognition', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #39
0
 def add_SecretDiscoveryServiceServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'StreamSecrets': grpc.stream_stream_rpc_method_handler(
           servicer.StreamSecrets,
           request_deserializer=envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryRequest.FromString,
           response_serializer=envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryResponse.SerializeToString,
       ),
       'FetchSecrets': grpc.unary_unary_rpc_method_handler(
           servicer.FetchSecrets,
           request_deserializer=envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryRequest.FromString,
           response_serializer=envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryResponse.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'envoy.service.discovery.v2.SecretDiscoveryService', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
Exemple #40
0
 def add_RemotingServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'Connect': grpc.unary_unary_rpc_method_handler(
           servicer.Connect,
           request_deserializer=ConnectRequest.FromString,
           response_serializer=ConnectResponse.SerializeToString,
       ),
       'Receive': grpc.stream_stream_rpc_method_handler(
           servicer.Receive,
           request_deserializer=MessageBatch.FromString,
           response_serializer=Unit.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'remote.Remoting', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
Exemple #41
0
def add_ObjectDetectionServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DetectStream': grpc.stream_stream_rpc_method_handler(
          servicer.DetectStream,
          request_deserializer=serving__pb2.DetectionRequest.FromString,
          response_serializer=serving__pb2.DetectionResponse.SerializeToString,
      ),
      'Detect': grpc.unary_unary_rpc_method_handler(
          servicer.Detect,
          request_deserializer=serving__pb2.DetectionRequest.FromString,
          response_serializer=serving__pb2.DetectionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'serving.ObjectDetection', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #42
0
def add_SpankyServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ExposeMethods': grpc.unary_unary_rpc_method_handler(
          servicer.ExposeMethods,
          request_deserializer=spanky_dot_inputs_dot_rpc_dot_spanky__pb2.NewCli.FromString,
          response_serializer=spanky_dot_inputs_dot_rpc_dot_spanky__pb2.AckCli.SerializeToString,
      ),
      'DoWork': grpc.stream_stream_rpc_method_handler(
          servicer.DoWork,
          request_deserializer=spanky_dot_inputs_dot_rpc_dot_spanky__pb2.WorkRequest.FromString,
          response_serializer=spanky_dot_inputs_dot_rpc_dot_spanky__pb2.WorkRequest.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'spanky.Spanky', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ChatServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'realTimeChat': grpc.stream_stream_rpc_method_handler(
          servicer.realTimeChat,
          request_deserializer=chat__pb2.UserMessage.FromString,
          response_serializer=chat__pb2.UserMessage.SerializeToString,
      ),
      'listUserMessages': grpc.unary_stream_rpc_method_handler(
          servicer.listUserMessages,
          request_deserializer=chat__pb2.ListMessagesRequest.FromString,
          response_serializer=chat__pb2.UserMessage.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'chat.Chat', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_GossipServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GossipStream': grpc.stream_stream_rpc_method_handler(
          servicer.GossipStream,
          request_deserializer=gossip_dot_message__pb2.Envelope.FromString,
          response_serializer=gossip_dot_message__pb2.Envelope.SerializeToString,
      ),
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=gossip_dot_message__pb2.Empty.FromString,
          response_serializer=gossip_dot_message__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'gossip.Gossip', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #45
0
def add_ASRServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Recognize': grpc.stream_stream_rpc_method_handler(
          servicer.Recognize,
          request_deserializer=asr__service__pb2.RecognizeRequest.FromString,
          response_serializer=asr__service__pb2.RecognizeResponse.SerializeToString,
      ),
      'DefineGrammar': grpc.unary_unary_rpc_method_handler(
          servicer.DefineGrammar,
          request_deserializer=asr__service__pb2.DefineGrammarRequest.FromString,
          response_serializer=asr__service__pb2.DefineGrammarRespone.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'sarmata.ASR', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #46
0
def add_SessionsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DetectIntent': grpc.unary_unary_rpc_method_handler(
          servicer.DetectIntent,
          request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DetectIntentRequest.FromString,
          response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.DetectIntentResponse.SerializeToString,
      ),
      'StreamingDetectIntent': grpc.stream_stream_rpc_method_handler(
          servicer.StreamingDetectIntent,
          request_deserializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.StreamingDetectIntentRequest.FromString,
          response_serializer=google_dot_cloud_dot_dialogflow__v2_dot_proto_dot_session__pb2.StreamingDetectIntentResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.cloud.dialogflow.v2.Sessions', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ServerReflectionServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'ServerReflectionInfo':
        grpc.stream_stream_rpc_method_handler(
            servicer.ServerReflectionInfo,
            request_deserializer=
            grpc_dot_reflection_dot_v1alpha_dot_reflection__pb2.
            ServerReflectionRequest.FromString,
            response_serializer=
            grpc_dot_reflection_dot_v1alpha_dot_reflection__pb2.
            ServerReflectionResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'grpc.reflection.v1alpha.ServerReflection', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #48
0
def add_ProcessBrokerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'run': grpc.stream_stream_rpc_method_handler(
          servicer.run,
          request_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.ProcessRequest.FromString,
          response_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.SerializeToString,
      ),
      'download': grpc.unary_stream_rpc_method_handler(
          servicer.download,
          request_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DownloadRequest.FromString,
          response_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'hypernets.dispatchers.process.grpc.proto.ProcessBroker', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #49
0
def add_MatServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'login': grpc.unary_unary_rpc_method_handler(
                    servicer.login,
                    request_deserializer=mat__pb2.LoginRequest.FromString,
                    response_serializer=mat__pb2.UserLoginResponse.SerializeToString,
            ),
            'GameStream': grpc.stream_stream_rpc_method_handler(
                    servicer.GameStream,
                    request_deserializer=mat__pb2.ActionRequest.FromString,
                    response_serializer=mat__pb2.ActionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Mat', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #50
0
def add_StateRpcServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'get_account_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_account_state,
            request_deserializer=rpc__pb2.RequestGetAccountState.FromString,
            response_serializer=rpc__pb2.ResponseGetAccountState.
            SerializeToString,
        ),
        'get_asset_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_asset_state,
            request_deserializer=rpc__pb2.RequestGetAssetState.FromString,
            response_serializer=rpc__pb2.ResponseGetAssetState.
            SerializeToString,
        ),
        'get_forge_state':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_forge_state,
            request_deserializer=rpc__pb2.RequestGetForgeState.FromString,
            response_serializer=rpc__pb2.ResponseGetForgeState.
            SerializeToString,
        ),
        'get_protocol_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_protocol_state,
            request_deserializer=rpc__pb2.RequestGetProtocolState.FromString,
            response_serializer=rpc__pb2.ResponseGetProtocolState.
            SerializeToString,
        ),
        'get_stake_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_stake_state,
            request_deserializer=rpc__pb2.RequestGetStakeState.FromString,
            response_serializer=rpc__pb2.ResponseGetStakeState.
            SerializeToString,
        ),
        'get_swap_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_swap_state,
            request_deserializer=rpc__pb2.RequestGetSwapState.FromString,
            response_serializer=rpc__pb2.ResponseGetSwapState.
            SerializeToString,
        ),
        'get_delegate_state':
        grpc.stream_stream_rpc_method_handler(
            servicer.get_delegate_state,
            request_deserializer=rpc__pb2.RequestGetDelegateState.FromString,
            response_serializer=rpc__pb2.ResponseGetDelegateState.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'forge_abi.StateRpc', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Exemple #51
0
def add_DBLogControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PullDumpInfo': grpc.stream_stream_rpc_method_handler(
                    servicer.PullDumpInfo,
                    request_deserializer=pb_dot_pgcapture__pb2.DumpInfoRequest.FromString,
                    response_serializer=pb_dot_pgcapture__pb2.DumpInfoResponse.SerializeToString,
            ),
            'Schedule': grpc.unary_unary_rpc_method_handler(
                    servicer.Schedule,
                    request_deserializer=pb_dot_pgcapture__pb2.ScheduleRequest.FromString,
                    response_serializer=pb_dot_pgcapture__pb2.ScheduleResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'pgcapture.DBLogController', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
 def add_StoreServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'AddItem': grpc.unary_unary_rpc_method_handler(
           servicer.AddItem,
           request_deserializer=AddItemRequest.FromString,
           response_serializer=Empty.SerializeToString,
       ),
       'AddItems': grpc.stream_unary_rpc_method_handler(
           servicer.AddItems,
           request_deserializer=AddItemRequest.FromString,
           response_serializer=Empty.SerializeToString,
       ),
       'RemoveItem': grpc.unary_unary_rpc_method_handler(
           servicer.RemoveItem,
           request_deserializer=RemoveItemRequest.FromString,
           response_serializer=RemoveItemResponse.SerializeToString,
       ),
       'RemoveItems': grpc.stream_unary_rpc_method_handler(
           servicer.RemoveItems,
           request_deserializer=RemoveItemRequest.FromString,
           response_serializer=RemoveItemResponse.SerializeToString,
       ),
       'ListInventory': grpc.unary_stream_rpc_method_handler(
           servicer.ListInventory,
           request_deserializer=Empty.FromString,
           response_serializer=QuantityResponse.SerializeToString,
       ),
       'QueryQuantity': grpc.unary_unary_rpc_method_handler(
           servicer.QueryQuantity,
           request_deserializer=QueryItemRequest.FromString,
           response_serializer=QuantityResponse.SerializeToString,
       ),
       'QueryQuantities': grpc.stream_stream_rpc_method_handler(
           servicer.QueryQuantities,
           request_deserializer=QueryItemRequest.FromString,
           response_serializer=QuantityResponse.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'store.Store', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_EventListenerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SendEvents': grpc.stream_stream_rpc_method_handler(
          servicer.SendEvents,
          request_deserializer=tensorflow_dot_core_dot_util_dot_event__pb2.Event.FromString,
          response_serializer=tensorflow_dot_core_dot_debug_dot_debug__service__pb2.EventReply.SerializeToString,
      ),
      'SendTracebacks': grpc.unary_unary_rpc_method_handler(
          servicer.SendTracebacks,
          request_deserializer=tensorflow_dot_core_dot_debug_dot_debug__service__pb2.CallTraceback.FromString,
          response_serializer=tensorflow_dot_core_dot_debug_dot_debug__service__pb2.EventReply.SerializeToString,
      ),
      'SendSourceFiles': grpc.unary_unary_rpc_method_handler(
          servicer.SendSourceFiles,
          request_deserializer=tensorflow_dot_core_dot_protobuf_dot_debug__pb2.DebuggedSourceFiles.FromString,
          response_serializer=tensorflow_dot_core_dot_debug_dot_debug__service__pb2.EventReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorflow.EventListener', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_SpeechServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Recognize': grpc.unary_unary_rpc_method_handler(
          servicer.Recognize,
          request_deserializer=google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2.RecognizeRequest.FromString,
          response_serializer=google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2.RecognizeResponse.SerializeToString,
      ),
      'LongRunningRecognize': grpc.unary_unary_rpc_method_handler(
          servicer.LongRunningRecognize,
          request_deserializer=google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2.LongRunningRecognizeRequest.FromString,
          response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
      ),
      'StreamingRecognize': grpc.stream_stream_rpc_method_handler(
          servicer.StreamingRecognize,
          request_deserializer=google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2.StreamingRecognizeRequest.FromString,
          response_serializer=google_dot_cloud_dot_speech__v1_dot_proto_dot_cloud__speech__pb2.StreamingRecognizeResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.cloud.speech.v1.Speech', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Exemple #55
0
def add_RouteGuideServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetFeature": grpc.unary_unary_rpc_method_handler(
            servicer.GetFeature, request_deserializer=Point.FromString, response_serializer=Feature.SerializeToString
        ),
        "ListFeatures": grpc.unary_stream_rpc_method_handler(
            servicer.ListFeatures,
            request_deserializer=Rectangle.FromString,
            response_serializer=Feature.SerializeToString,
        ),
        "RecordRoute": grpc.stream_unary_rpc_method_handler(
            servicer.RecordRoute,
            request_deserializer=Point.FromString,
            response_serializer=RouteSummary.SerializeToString,
        ),
        "RouteChat": grpc.stream_stream_rpc_method_handler(
            servicer.RouteChat,
            request_deserializer=RouteNote.FromString,
            response_serializer=RouteNote.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("routeguide.RouteGuide", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Exemple #56
0
def add_BfKvServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=bfgateway__pb2.BfPingData.FromString,
          response_serializer=bfgateway__pb2.BfPingData.SerializeToString,
      ),
      'PingStreamCS': grpc.stream_stream_rpc_method_handler(
          servicer.PingStreamCS,
          request_deserializer=google_dot_protobuf_dot_any__pb2.Any.FromString,
          response_serializer=google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
      ),
      'PingStreamC': grpc.stream_unary_rpc_method_handler(
          servicer.PingStreamC,
          request_deserializer=google_dot_protobuf_dot_any__pb2.Any.FromString,
          response_serializer=google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
      ),
      'PingStreamS': grpc.unary_stream_rpc_method_handler(
          servicer.PingStreamS,
          request_deserializer=google_dot_protobuf_dot_any__pb2.Any.FromString,
          response_serializer=google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
      ),
      'SetKv': grpc.unary_unary_rpc_method_handler(
          servicer.SetKv,
          request_deserializer=bfgateway__pb2.BfKvData.FromString,
          response_serializer=bfgateway__pb2.BfVoid.SerializeToString,
      ),
      'GetKv': grpc.unary_unary_rpc_method_handler(
          servicer.GetKv,
          request_deserializer=bfgateway__pb2.BfKvData.FromString,
          response_serializer=bfgateway__pb2.BfKvData.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bfkv.BfKvService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_LightningServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'WalletBalance': grpc.unary_unary_rpc_method_handler(
          servicer.WalletBalance,
          request_deserializer=rpc__pb2.WalletBalanceRequest.FromString,
          response_serializer=rpc__pb2.WalletBalanceResponse.SerializeToString,
      ),
      'ChannelBalance': grpc.unary_unary_rpc_method_handler(
          servicer.ChannelBalance,
          request_deserializer=rpc__pb2.ChannelBalanceRequest.FromString,
          response_serializer=rpc__pb2.ChannelBalanceResponse.SerializeToString,
      ),
      'GetTransactions': grpc.unary_unary_rpc_method_handler(
          servicer.GetTransactions,
          request_deserializer=rpc__pb2.GetTransactionsRequest.FromString,
          response_serializer=rpc__pb2.TransactionDetails.SerializeToString,
      ),
      'SendCoins': grpc.unary_unary_rpc_method_handler(
          servicer.SendCoins,
          request_deserializer=rpc__pb2.SendCoinsRequest.FromString,
          response_serializer=rpc__pb2.SendCoinsResponse.SerializeToString,
      ),
      'SubscribeTransactions': grpc.unary_stream_rpc_method_handler(
          servicer.SubscribeTransactions,
          request_deserializer=rpc__pb2.GetTransactionsRequest.FromString,
          response_serializer=rpc__pb2.Transaction.SerializeToString,
      ),
      'SendMany': grpc.unary_unary_rpc_method_handler(
          servicer.SendMany,
          request_deserializer=rpc__pb2.SendManyRequest.FromString,
          response_serializer=rpc__pb2.SendManyResponse.SerializeToString,
      ),
      'NewAddress': grpc.unary_unary_rpc_method_handler(
          servicer.NewAddress,
          request_deserializer=rpc__pb2.NewAddressRequest.FromString,
          response_serializer=rpc__pb2.NewAddressResponse.SerializeToString,
      ),
      'NewWitnessAddress': grpc.unary_unary_rpc_method_handler(
          servicer.NewWitnessAddress,
          request_deserializer=rpc__pb2.NewWitnessAddressRequest.FromString,
          response_serializer=rpc__pb2.NewAddressResponse.SerializeToString,
      ),
      'SignMessage': grpc.unary_unary_rpc_method_handler(
          servicer.SignMessage,
          request_deserializer=rpc__pb2.SignMessageRequest.FromString,
          response_serializer=rpc__pb2.SignMessageResponse.SerializeToString,
      ),
      'VerifyMessage': grpc.unary_unary_rpc_method_handler(
          servicer.VerifyMessage,
          request_deserializer=rpc__pb2.VerifyMessageRequest.FromString,
          response_serializer=rpc__pb2.VerifyMessageResponse.SerializeToString,
      ),
      'ConnectPeer': grpc.unary_unary_rpc_method_handler(
          servicer.ConnectPeer,
          request_deserializer=rpc__pb2.ConnectPeerRequest.FromString,
          response_serializer=rpc__pb2.ConnectPeerResponse.SerializeToString,
      ),
      'DisconnectPeer': grpc.unary_unary_rpc_method_handler(
          servicer.DisconnectPeer,
          request_deserializer=rpc__pb2.DisconnectPeerRequest.FromString,
          response_serializer=rpc__pb2.DisconnectPeerResponse.SerializeToString,
      ),
      'ListPeers': grpc.unary_unary_rpc_method_handler(
          servicer.ListPeers,
          request_deserializer=rpc__pb2.ListPeersRequest.FromString,
          response_serializer=rpc__pb2.ListPeersResponse.SerializeToString,
      ),
      'GetInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetInfo,
          request_deserializer=rpc__pb2.GetInfoRequest.FromString,
          response_serializer=rpc__pb2.GetInfoResponse.SerializeToString,
      ),
      'PendingChannels': grpc.unary_unary_rpc_method_handler(
          servicer.PendingChannels,
          request_deserializer=rpc__pb2.PendingChannelsRequest.FromString,
          response_serializer=rpc__pb2.PendingChannelsResponse.SerializeToString,
      ),
      'ListChannels': grpc.unary_unary_rpc_method_handler(
          servicer.ListChannels,
          request_deserializer=rpc__pb2.ListChannelsRequest.FromString,
          response_serializer=rpc__pb2.ListChannelsResponse.SerializeToString,
      ),
      'ClosedChannels': grpc.unary_unary_rpc_method_handler(
          servicer.ClosedChannels,
          request_deserializer=rpc__pb2.ClosedChannelsRequest.FromString,
          response_serializer=rpc__pb2.ClosedChannelsResponse.SerializeToString,
      ),
      'OpenChannelSync': grpc.unary_unary_rpc_method_handler(
          servicer.OpenChannelSync,
          request_deserializer=rpc__pb2.OpenChannelRequest.FromString,
          response_serializer=rpc__pb2.ChannelPoint.SerializeToString,
      ),
      'OpenChannel': grpc.unary_stream_rpc_method_handler(
          servicer.OpenChannel,
          request_deserializer=rpc__pb2.OpenChannelRequest.FromString,
          response_serializer=rpc__pb2.OpenStatusUpdate.SerializeToString,
      ),
      'CloseChannel': grpc.unary_stream_rpc_method_handler(
          servicer.CloseChannel,
          request_deserializer=rpc__pb2.CloseChannelRequest.FromString,
          response_serializer=rpc__pb2.CloseStatusUpdate.SerializeToString,
      ),
      'SendPayment': grpc.stream_stream_rpc_method_handler(
          servicer.SendPayment,
          request_deserializer=rpc__pb2.SendRequest.FromString,
          response_serializer=rpc__pb2.SendResponse.SerializeToString,
      ),
      'SendPaymentSync': grpc.unary_unary_rpc_method_handler(
          servicer.SendPaymentSync,
          request_deserializer=rpc__pb2.SendRequest.FromString,
          response_serializer=rpc__pb2.SendResponse.SerializeToString,
      ),
      'SendToRoute': grpc.stream_stream_rpc_method_handler(
          servicer.SendToRoute,
          request_deserializer=rpc__pb2.SendToRouteRequest.FromString,
          response_serializer=rpc__pb2.SendResponse.SerializeToString,
      ),
      'SendToRouteSync': grpc.unary_unary_rpc_method_handler(
          servicer.SendToRouteSync,
          request_deserializer=rpc__pb2.SendToRouteRequest.FromString,
          response_serializer=rpc__pb2.SendResponse.SerializeToString,
      ),
      'AddInvoice': grpc.unary_unary_rpc_method_handler(
          servicer.AddInvoice,
          request_deserializer=rpc__pb2.Invoice.FromString,
          response_serializer=rpc__pb2.AddInvoiceResponse.SerializeToString,
      ),
      'ListInvoices': grpc.unary_unary_rpc_method_handler(
          servicer.ListInvoices,
          request_deserializer=rpc__pb2.ListInvoiceRequest.FromString,
          response_serializer=rpc__pb2.ListInvoiceResponse.SerializeToString,
      ),
      'LookupInvoice': grpc.unary_unary_rpc_method_handler(
          servicer.LookupInvoice,
          request_deserializer=rpc__pb2.PaymentHash.FromString,
          response_serializer=rpc__pb2.Invoice.SerializeToString,
      ),
      'SubscribeInvoices': grpc.unary_stream_rpc_method_handler(
          servicer.SubscribeInvoices,
          request_deserializer=rpc__pb2.InvoiceSubscription.FromString,
          response_serializer=rpc__pb2.Invoice.SerializeToString,
      ),
      'DecodePayReq': grpc.unary_unary_rpc_method_handler(
          servicer.DecodePayReq,
          request_deserializer=rpc__pb2.PayReqString.FromString,
          response_serializer=rpc__pb2.PayReq.SerializeToString,
      ),
      'ListPayments': grpc.unary_unary_rpc_method_handler(
          servicer.ListPayments,
          request_deserializer=rpc__pb2.ListPaymentsRequest.FromString,
          response_serializer=rpc__pb2.ListPaymentsResponse.SerializeToString,
      ),
      'DeleteAllPayments': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteAllPayments,
          request_deserializer=rpc__pb2.DeleteAllPaymentsRequest.FromString,
          response_serializer=rpc__pb2.DeleteAllPaymentsResponse.SerializeToString,
      ),
      'DescribeGraph': grpc.unary_unary_rpc_method_handler(
          servicer.DescribeGraph,
          request_deserializer=rpc__pb2.ChannelGraphRequest.FromString,
          response_serializer=rpc__pb2.ChannelGraph.SerializeToString,
      ),
      'GetChanInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetChanInfo,
          request_deserializer=rpc__pb2.ChanInfoRequest.FromString,
          response_serializer=rpc__pb2.ChannelEdge.SerializeToString,
      ),
      'GetNodeInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetNodeInfo,
          request_deserializer=rpc__pb2.NodeInfoRequest.FromString,
          response_serializer=rpc__pb2.NodeInfo.SerializeToString,
      ),
      'QueryRoutes': grpc.unary_unary_rpc_method_handler(
          servicer.QueryRoutes,
          request_deserializer=rpc__pb2.QueryRoutesRequest.FromString,
          response_serializer=rpc__pb2.QueryRoutesResponse.SerializeToString,
      ),
      'GetNetworkInfo': grpc.unary_unary_rpc_method_handler(
          servicer.GetNetworkInfo,
          request_deserializer=rpc__pb2.NetworkInfoRequest.FromString,
          response_serializer=rpc__pb2.NetworkInfo.SerializeToString,
      ),
      'StopDaemon': grpc.unary_unary_rpc_method_handler(
          servicer.StopDaemon,
          request_deserializer=rpc__pb2.StopRequest.FromString,
          response_serializer=rpc__pb2.StopResponse.SerializeToString,
      ),
      'SubscribeChannelGraph': grpc.unary_stream_rpc_method_handler(
          servicer.SubscribeChannelGraph,
          request_deserializer=rpc__pb2.GraphTopologySubscription.FromString,
          response_serializer=rpc__pb2.GraphTopologyUpdate.SerializeToString,
      ),
      'DebugLevel': grpc.unary_unary_rpc_method_handler(
          servicer.DebugLevel,
          request_deserializer=rpc__pb2.DebugLevelRequest.FromString,
          response_serializer=rpc__pb2.DebugLevelResponse.SerializeToString,
      ),
      'FeeReport': grpc.unary_unary_rpc_method_handler(
          servicer.FeeReport,
          request_deserializer=rpc__pb2.FeeReportRequest.FromString,
          response_serializer=rpc__pb2.FeeReportResponse.SerializeToString,
      ),
      'UpdateChannelPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateChannelPolicy,
          request_deserializer=rpc__pb2.PolicyUpdateRequest.FromString,
          response_serializer=rpc__pb2.PolicyUpdateResponse.SerializeToString,
      ),
      'ForwardingHistory': grpc.unary_unary_rpc_method_handler(
          servicer.ForwardingHistory,
          request_deserializer=rpc__pb2.ForwardingHistoryRequest.FromString,
          response_serializer=rpc__pb2.ForwardingHistoryResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'lnrpc.Lightning', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_FirestoreServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetDocument': grpc.unary_unary_rpc_method_handler(
          servicer.GetDocument,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.GetDocumentRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_document__pb2.Document.SerializeToString,
      ),
      'ListDocuments': grpc.unary_unary_rpc_method_handler(
          servicer.ListDocuments,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListDocumentsRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListDocumentsResponse.SerializeToString,
      ),
      'CreateDocument': grpc.unary_unary_rpc_method_handler(
          servicer.CreateDocument,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.CreateDocumentRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_document__pb2.Document.SerializeToString,
      ),
      'UpdateDocument': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateDocument,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.UpdateDocumentRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_document__pb2.Document.SerializeToString,
      ),
      'DeleteDocument': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDocument,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.DeleteDocumentRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'BatchGetDocuments': grpc.unary_stream_rpc_method_handler(
          servicer.BatchGetDocuments,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.BatchGetDocumentsRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.BatchGetDocumentsResponse.SerializeToString,
      ),
      'BeginTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.BeginTransaction,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.BeginTransactionRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.BeginTransactionResponse.SerializeToString,
      ),
      'Commit': grpc.unary_unary_rpc_method_handler(
          servicer.Commit,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.CommitRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.CommitResponse.SerializeToString,
      ),
      'Rollback': grpc.unary_unary_rpc_method_handler(
          servicer.Rollback,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.RollbackRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'RunQuery': grpc.unary_stream_rpc_method_handler(
          servicer.RunQuery,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.RunQueryRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.RunQueryResponse.SerializeToString,
      ),
      'Write': grpc.stream_stream_rpc_method_handler(
          servicer.Write,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.WriteRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.WriteResponse.SerializeToString,
      ),
      'Listen': grpc.stream_stream_rpc_method_handler(
          servicer.Listen,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListenRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListenResponse.SerializeToString,
      ),
      'ListCollectionIds': grpc.unary_unary_rpc_method_handler(
          servicer.ListCollectionIds,
          request_deserializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListCollectionIdsRequest.FromString,
          response_serializer=google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_firestore__pb2.ListCollectionIdsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.firestore.v1beta1.Firestore', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_SubscriberServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateSubscription": grpc.unary_unary_rpc_method_handler(
            servicer.CreateSubscription,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Subscription.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Subscription.SerializeToString,
        ),
        "GetSubscription": grpc.unary_unary_rpc_method_handler(
            servicer.GetSubscription,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.GetSubscriptionRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Subscription.SerializeToString,
        ),
        "UpdateSubscription": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateSubscription,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.UpdateSubscriptionRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Subscription.SerializeToString,
        ),
        "ListSubscriptions": grpc.unary_unary_rpc_method_handler(
            servicer.ListSubscriptions,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ListSubscriptionsRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ListSubscriptionsResponse.SerializeToString,
        ),
        "DeleteSubscription": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteSubscription,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.DeleteSubscriptionRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "ModifyAckDeadline": grpc.unary_unary_rpc_method_handler(
            servicer.ModifyAckDeadline,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ModifyAckDeadlineRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "Acknowledge": grpc.unary_unary_rpc_method_handler(
            servicer.Acknowledge,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.AcknowledgeRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "Pull": grpc.unary_unary_rpc_method_handler(
            servicer.Pull,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.PullRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.PullResponse.SerializeToString,
        ),
        "StreamingPull": grpc.stream_stream_rpc_method_handler(
            servicer.StreamingPull,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.StreamingPullRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.StreamingPullResponse.SerializeToString,
        ),
        "ModifyPushConfig": grpc.unary_unary_rpc_method_handler(
            servicer.ModifyPushConfig,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ModifyPushConfigRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "GetSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.GetSnapshot,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.GetSnapshotRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Snapshot.SerializeToString,
        ),
        "ListSnapshots": grpc.unary_unary_rpc_method_handler(
            servicer.ListSnapshots,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ListSnapshotsRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.ListSnapshotsResponse.SerializeToString,
        ),
        "CreateSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.CreateSnapshot,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.CreateSnapshotRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Snapshot.SerializeToString,
        ),
        "UpdateSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateSnapshot,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.UpdateSnapshotRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.Snapshot.SerializeToString,
        ),
        "DeleteSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteSnapshot,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.DeleteSnapshotRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "Seek": grpc.unary_unary_rpc_method_handler(
            servicer.Seek,
            request_deserializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.SeekRequest.FromString,
            response_serializer=google_dot_cloud_dot_pubsub__v1_dot_proto_dot_pubsub__pb2.SeekResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.pubsub.v1.Subscriber", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_FirestoreServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetDocument": grpc.unary_unary_rpc_method_handler(
            servicer.GetDocument,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.GetDocumentRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_document__pb2.Document.SerializeToString,
        ),
        "ListDocuments": grpc.unary_unary_rpc_method_handler(
            servicer.ListDocuments,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListDocumentsRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListDocumentsResponse.SerializeToString,
        ),
        "CreateDocument": grpc.unary_unary_rpc_method_handler(
            servicer.CreateDocument,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.CreateDocumentRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_document__pb2.Document.SerializeToString,
        ),
        "UpdateDocument": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateDocument,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.UpdateDocumentRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_document__pb2.Document.SerializeToString,
        ),
        "DeleteDocument": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteDocument,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.DeleteDocumentRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "BatchGetDocuments": grpc.unary_stream_rpc_method_handler(
            servicer.BatchGetDocuments,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.BatchGetDocumentsRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.BatchGetDocumentsResponse.SerializeToString,
        ),
        "BeginTransaction": grpc.unary_unary_rpc_method_handler(
            servicer.BeginTransaction,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.BeginTransactionRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.BeginTransactionResponse.SerializeToString,
        ),
        "Commit": grpc.unary_unary_rpc_method_handler(
            servicer.Commit,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.CommitRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.CommitResponse.SerializeToString,
        ),
        "Rollback": grpc.unary_unary_rpc_method_handler(
            servicer.Rollback,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.RollbackRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "RunQuery": grpc.unary_stream_rpc_method_handler(
            servicer.RunQuery,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.RunQueryRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.RunQueryResponse.SerializeToString,
        ),
        "Write": grpc.stream_stream_rpc_method_handler(
            servicer.Write,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.WriteRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.WriteResponse.SerializeToString,
        ),
        "Listen": grpc.stream_stream_rpc_method_handler(
            servicer.Listen,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListenRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListenResponse.SerializeToString,
        ),
        "ListCollectionIds": grpc.unary_unary_rpc_method_handler(
            servicer.ListCollectionIds,
            request_deserializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListCollectionIdsRequest.FromString,
            response_serializer=google_dot_cloud_dot_firestore__v1_dot_proto_dot_firestore__pb2.ListCollectionIdsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.firestore.v1.Firestore", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))