Example #1
0
def add_ReleaseServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListReleases': grpc.unary_stream_rpc_method_handler(
          servicer.ListReleases,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.ListReleasesRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.ListReleasesResponse.SerializeToString,
      ),
      'GetReleaseStatus': grpc.unary_unary_rpc_method_handler(
          servicer.GetReleaseStatus,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.GetReleaseStatusRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.GetReleaseStatusResponse.SerializeToString,
      ),
      'GetReleaseContent': grpc.unary_unary_rpc_method_handler(
          servicer.GetReleaseContent,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.GetReleaseContentRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.GetReleaseContentResponse.SerializeToString,
      ),
      'UpdateRelease': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateRelease,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.UpdateReleaseRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.UpdateReleaseResponse.SerializeToString,
      ),
      'InstallRelease': grpc.unary_unary_rpc_method_handler(
          servicer.InstallRelease,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.InstallReleaseRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.InstallReleaseResponse.SerializeToString,
      ),
      'UninstallRelease': grpc.unary_unary_rpc_method_handler(
          servicer.UninstallRelease,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.UninstallReleaseRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.UninstallReleaseResponse.SerializeToString,
      ),
      'GetVersion': grpc.unary_unary_rpc_method_handler(
          servicer.GetVersion,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.GetVersionRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.GetVersionResponse.SerializeToString,
      ),
      'RollbackRelease': grpc.unary_unary_rpc_method_handler(
          servicer.RollbackRelease,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.RollbackReleaseRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.RollbackReleaseResponse.SerializeToString,
      ),
      'GetHistory': grpc.unary_unary_rpc_method_handler(
          servicer.GetHistory,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.GetHistoryRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.GetHistoryResponse.SerializeToString,
      ),
      'RunReleaseTest': grpc.unary_stream_rpc_method_handler(
          servicer.RunReleaseTest,
          request_deserializer=hapi_dot_services_dot_tiller__pb2.TestReleaseRequest.FromString,
          response_serializer=hapi_dot_services_dot_tiller__pb2.TestReleaseResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'hapi.services.tiller.ReleaseService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #2
0
def add_UpdateStreamServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "StreamKeyRange": grpc.unary_stream_rpc_method_handler(
            servicer.StreamKeyRange,
            request_deserializer=binlogdata__pb2.StreamKeyRangeRequest.FromString,
            response_serializer=binlogdata__pb2.StreamKeyRangeResponse.SerializeToString,
        ),
        "StreamTables": grpc.unary_stream_rpc_method_handler(
            servicer.StreamTables,
            request_deserializer=binlogdata__pb2.StreamTablesRequest.FromString,
            response_serializer=binlogdata__pb2.StreamTablesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("binlogservice.UpdateStream", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Example #3
0
def add_BfCtaServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ConnectPush': grpc.unary_stream_rpc_method_handler(
          servicer.ConnectPush,
          request_deserializer=bfgateway__pb2.BfConnectPushReq.FromString,
          response_serializer=google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
      ),
      'DisconnectPush': grpc.unary_unary_rpc_method_handler(
          servicer.DisconnectPush,
          request_deserializer=bfgateway__pb2.BfVoid.FromString,
          response_serializer=bfgateway__pb2.BfVoid.SerializeToString,
      ),
      'Ping': grpc.unary_unary_rpc_method_handler(
          servicer.Ping,
          request_deserializer=bfgateway__pb2.BfPingData.FromString,
          response_serializer=bfgateway__pb2.BfPingData.SerializeToString,
      ),
      'Start': grpc.unary_unary_rpc_method_handler(
          servicer.Start,
          request_deserializer=bfgateway__pb2.BfVoid.FromString,
          response_serializer=bfgateway__pb2.BfVoid.SerializeToString,
      ),
      'Stop': grpc.unary_unary_rpc_method_handler(
          servicer.Stop,
          request_deserializer=bfgateway__pb2.BfVoid.FromString,
          response_serializer=bfgateway__pb2.BfVoid.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'bfcta.BfCtaService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_IPythonServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'execute': grpc.unary_stream_rpc_method_handler(
          servicer.execute,
          request_deserializer=ipython__pb2.ExecuteRequest.FromString,
          response_serializer=ipython__pb2.ExecuteResponse.SerializeToString,
      ),
      'complete': grpc.unary_unary_rpc_method_handler(
          servicer.complete,
          request_deserializer=ipython__pb2.CompletionRequest.FromString,
          response_serializer=ipython__pb2.CompletionResponse.SerializeToString,
      ),
      'cancel': grpc.unary_unary_rpc_method_handler(
          servicer.cancel,
          request_deserializer=ipython__pb2.CancelRequest.FromString,
          response_serializer=ipython__pb2.CancelResponse.SerializeToString,
      ),
      'status': grpc.unary_unary_rpc_method_handler(
          servicer.status,
          request_deserializer=ipython__pb2.StatusRequest.FromString,
          response_serializer=ipython__pb2.StatusResponse.SerializeToString,
      ),
      'stop': grpc.unary_unary_rpc_method_handler(
          servicer.stop,
          request_deserializer=ipython__pb2.StopRequest.FromString,
          response_serializer=ipython__pb2.StopResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ipython.IPython', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #5
0
def add_APIv1Servicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Query': grpc.unary_unary_rpc_method_handler(
          servicer.Query,
          request_deserializer=msg__pb2.QueryRequests.FromString,
          response_serializer=msg__pb2.QueryReplies.SerializeToString,
      ),
      'Result': grpc.unary_unary_rpc_method_handler(
          servicer.Result,
          request_deserializer=msg__pb2.RequestID.FromString,
          response_serializer=msg__pb2.QueryResult.SerializeToString,
      ),
      'Suggest': grpc.unary_unary_rpc_method_handler(
          servicer.Suggest,
          request_deserializer=msg__pb2.Suggestion.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'Stream': grpc.unary_stream_rpc_method_handler(
          servicer.Stream,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=msg__pb2.QueryResult.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'zvelo.msg.APIv1', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #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 add_BigQueryStorageServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateReadSession": grpc.unary_unary_rpc_method_handler(
            servicer.CreateReadSession,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.CreateReadSessionRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadSession.SerializeToString,
        ),
        "ReadRows": grpc.unary_stream_rpc_method_handler(
            servicer.ReadRows,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.ReadRowsResponse.SerializeToString,
        ),
        "BatchCreateReadSessionStreams": grpc.unary_unary_rpc_method_handler(
            servicer.BatchCreateReadSessionStreams,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.BatchCreateReadSessionStreamsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.BatchCreateReadSessionStreamsResponse.SerializeToString,
        ),
        "FinalizeStream": grpc.unary_unary_rpc_method_handler(
            servicer.FinalizeStream,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.FinalizeStreamRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "SplitReadStream": grpc.unary_unary_rpc_method_handler(
            servicer.SplitReadStream,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.SplitReadStreamRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_storage__v1beta1_dot_proto_dot_storage__pb2.SplitReadStreamResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.bigquery.storage.v1beta1.BigQueryStorage", 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,))
def add_ExchangeServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'subscribeForExchange': grpc.unary_stream_rpc_method_handler(
          servicer.subscribeForExchange,
          request_deserializer=exchange__pb2.ExchangeRequest.FromString,
          response_serializer=exchange__pb2.ExchangeStream.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'Exchange', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_CurrencyExchangeServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'getRate': grpc.unary_stream_rpc_method_handler(
          servicer.getRate,
          request_deserializer=currency__pb2.RateRequest.FromString,
          response_serializer=currency__pb2.Rate.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'helloworld.CurrencyExchange', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_VtworkerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ExecuteVtworkerCommand': grpc.unary_stream_rpc_method_handler(
          servicer.ExecuteVtworkerCommand,
          request_deserializer=vtworkerdata__pb2.ExecuteVtworkerCommandRequest.FromString,
          response_serializer=vtworkerdata__pb2.ExecuteVtworkerCommandResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'vtworkerservice.Vtworker', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #12
0
def add_SimulatorServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Ping': grpc.unary_stream_rpc_method_handler(
          servicer.Ping,
          request_deserializer=simulator__pb2.Request.FromString,
          response_serializer=simulator__pb2.Reply.SerializeToString,
      ),
      'Init': grpc.unary_stream_rpc_method_handler(
          servicer.Init,
          request_deserializer=simulator__pb2.InitRequest.FromString,
          response_serializer=simulator__pb2.Proposal.SerializeToString,
      ),
      'Exit': grpc.unary_unary_rpc_method_handler(
          servicer.Exit,
          request_deserializer=simulator__pb2.Empty.FromString,
          response_serializer=simulator__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'simulator.Simulator', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_JavaForwardServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'request_inquiry_forward': grpc.unary_stream_rpc_method_handler(
          servicer.request_inquiry_forward,
          request_deserializer=request_inquiry.FromString,
          response_serializer=response_inquiry.SerializeToString,
      ),
      'request_syn_forward': grpc.unary_stream_rpc_method_handler(
          servicer.request_syn_forward,
          request_deserializer=request_syn.FromString,
          response_serializer=response_syn.SerializeToString,
      ),
      'request_push_forward': grpc.unary_stream_rpc_method_handler(
          servicer.request_push_forward,
          request_deserializer=request_push.FromString,
          response_serializer=response_push.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'center.JavaForward', 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_BigtableServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ReadRows": grpc.unary_stream_rpc_method_handler(
            servicer.ReadRows,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadRowsResponse.SerializeToString,
        ),
        "SampleRowKeys": grpc.unary_stream_rpc_method_handler(
            servicer.SampleRowKeys,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.SampleRowKeysResponse.SerializeToString,
        ),
        "MutateRow": grpc.unary_unary_rpc_method_handler(
            servicer.MutateRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowResponse.SerializeToString,
        ),
        "MutateRows": grpc.unary_stream_rpc_method_handler(
            servicer.MutateRows,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.MutateRowsResponse.SerializeToString,
        ),
        "CheckAndMutateRow": grpc.unary_unary_rpc_method_handler(
            servicer.CheckAndMutateRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.CheckAndMutateRowResponse.SerializeToString,
        ),
        "ReadModifyWriteRow": grpc.unary_unary_rpc_method_handler(
            servicer.ReadModifyWriteRow,
            request_deserializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigtable__v2_dot_proto_dot_bigtable__pb2.ReadModifyWriteRowResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.bigtable.v2.Bigtable", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
Example #16
0
def add_BigtableServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ReadRows': grpc.unary_stream_rpc_method_handler(
          servicer.ReadRows,
          request_deserializer=ReadRowsRequest.FromString,
          response_serializer=ReadRowsResponse.SerializeToString,
      ),
      'SampleRowKeys': grpc.unary_stream_rpc_method_handler(
          servicer.SampleRowKeys,
          request_deserializer=SampleRowKeysRequest.FromString,
          response_serializer=SampleRowKeysResponse.SerializeToString,
      ),
      'MutateRow': grpc.unary_unary_rpc_method_handler(
          servicer.MutateRow,
          request_deserializer=MutateRowRequest.FromString,
          response_serializer=MutateRowResponse.SerializeToString,
      ),
      'MutateRows': grpc.unary_stream_rpc_method_handler(
          servicer.MutateRows,
          request_deserializer=MutateRowsRequest.FromString,
          response_serializer=MutateRowsResponse.SerializeToString,
      ),
      'CheckAndMutateRow': grpc.unary_unary_rpc_method_handler(
          servicer.CheckAndMutateRow,
          request_deserializer=CheckAndMutateRowRequest.FromString,
          response_serializer=CheckAndMutateRowResponse.SerializeToString,
      ),
      'ReadModifyWriteRow': grpc.unary_unary_rpc_method_handler(
          servicer.ReadModifyWriteRow,
          request_deserializer=ReadModifyWriteRowRequest.FromString,
          response_serializer=ReadModifyWriteRowResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.bigtable.v2.Bigtable', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #17
0
 def add_TranslatorServicer_to_server(servicer, server):
   rpc_method_handlers = {
       'Translate': grpc.unary_unary_rpc_method_handler(
           servicer.Translate,
           request_deserializer=TranslationRequest.FromString,
           response_serializer=TranslationReply.SerializeToString,
       ),
       'AllTranslations': grpc.unary_stream_rpc_method_handler(
           servicer.AllTranslations,
           request_deserializer=AllTranslationsRequest.FromString,
           response_serializer=AllTranslationsReply.SerializeToString,
       ),
   }
   generic_handler = grpc.method_handlers_generic_handler(
       'srecon.Translator', rpc_method_handlers)
   server.add_generic_rpc_handlers((generic_handler,))
def add_RecordReaderServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Query': grpc.unary_stream_rpc_method_handler(
            servicer.Query,
            request_deserializer=QueryRequest.FromString,
            response_serializer=QueryResponse.SerializeToString, ),
        'Write': grpc.unary_unary_rpc_method_handler(
            servicer.Write,
            request_deserializer=WriteRequest.FromString,
            response_serializer=WriteResponse.SerializeToString, ),
        'ProtoNames': grpc.unary_unary_rpc_method_handler(
            servicer.ProtoNames,
            request_deserializer=CompletionRequest.FromString,
            response_serializer=CompletionResponse.SerializeToString, ),
    }
    generic_handler = grpc.method_handlers_generic_handler('RecordReader',
                                                           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_MediaDownloaderServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'DownloadMedia': grpc.unary_unary_rpc_method_handler(
          servicer.DownloadMedia,
          request_deserializer=mmp__pb2.MediaDownload.FromString,
          response_serializer=mmp__pb2.DownloadStatus.SerializeToString,
      ),
      'RetrieveMDStatus': grpc.unary_unary_rpc_method_handler(
          servicer.RetrieveMDStatus,
          request_deserializer=mmp__pb2.MDStatusRequest.FromString,
          response_serializer=mmp__pb2.MDStatus.SerializeToString,
      ),
      'NotifyMDStatus': grpc.unary_stream_rpc_method_handler(
          servicer.NotifyMDStatus,
          request_deserializer=mmp__pb2.MDStatusRequest.FromString,
          response_serializer=mmp__pb2.MDStatus.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.MediaDownloader', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_BlockChainServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'receive_request_inquiry': grpc.unary_unary_rpc_method_handler(
          servicer.receive_request_inquiry,
          request_deserializer=request_inquiry.FromString,
          response_serializer=response_inquiry.SerializeToString,
      ),
      'receive_request_syn': grpc.unary_stream_rpc_method_handler(
          servicer.receive_request_syn,
          request_deserializer=request_syn.FromString,
          response_serializer=response_syn.SerializeToString,
      ),
      'receive_request_push': grpc.unary_unary_rpc_method_handler(
          servicer.receive_request_push,
          request_deserializer=request_push.FromString,
          response_serializer=response_push.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'center.BlockChain', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #22
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,))
def add_VariantServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SearchVariantSets': grpc.unary_unary_rpc_method_handler(
          servicer.SearchVariantSets,
          request_deserializer=SearchVariantSetsRequest.FromString,
          response_serializer=SearchVariantSetsResponse.SerializeToString,
      ),
      'GetVariantSet': grpc.unary_unary_rpc_method_handler(
          servicer.GetVariantSet,
          request_deserializer=GetVariantSetRequest.FromString,
          response_serializer=ga4gh_dot_variants__pb2.VariantSet.SerializeToString,
      ),
      'SearchVariants': grpc.unary_stream_rpc_method_handler(
          servicer.SearchVariants,
          request_deserializer=SearchVariantsRequest.FromString,
          response_serializer=ga4gh_dot_variants__pb2.Variant.SerializeToString,
      ),
      'GetVariant': grpc.unary_unary_rpc_method_handler(
          servicer.GetVariant,
          request_deserializer=GetVariantRequest.FromString,
          response_serializer=ga4gh_dot_variants__pb2.Variant.SerializeToString,
      ),
      'SearchCallSets': grpc.unary_unary_rpc_method_handler(
          servicer.SearchCallSets,
          request_deserializer=SearchCallSetsRequest.FromString,
          response_serializer=SearchCallSetsResponse.SerializeToString,
      ),
      'GetCallSet': grpc.unary_unary_rpc_method_handler(
          servicer.GetCallSet,
          request_deserializer=GetCallSetRequest.FromString,
          response_serializer=ga4gh_dot_variants__pb2.CallSet.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ga4gh.VariantService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #24
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,))
Example #25
0
def add_WAVEServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateEntity':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateEntity,
            request_deserializer=eapi__pb2.CreateEntityParams.FromString,
            response_serializer=eapi__pb2.CreateEntityResponse.
            SerializeToString,
        ),
        'CreateAttestation':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateAttestation,
            request_deserializer=eapi__pb2.CreateAttestationParams.FromString,
            response_serializer=eapi__pb2.CreateAttestationResponse.
            SerializeToString,
        ),
        'PublishEntity':
        grpc.unary_unary_rpc_method_handler(
            servicer.PublishEntity,
            request_deserializer=eapi__pb2.PublishEntityParams.FromString,
            response_serializer=eapi__pb2.PublishEntityResponse.
            SerializeToString,
        ),
        'PublishAttestation':
        grpc.unary_unary_rpc_method_handler(
            servicer.PublishAttestation,
            request_deserializer=eapi__pb2.PublishAttestationParams.FromString,
            response_serializer=eapi__pb2.PublishAttestationResponse.
            SerializeToString,
        ),
        'AddAttestation':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddAttestation,
            request_deserializer=eapi__pb2.AddAttestationParams.FromString,
            response_serializer=eapi__pb2.AddAttestationResponse.
            SerializeToString,
        ),
        'LookupAttestations':
        grpc.unary_unary_rpc_method_handler(
            servicer.LookupAttestations,
            request_deserializer=eapi__pb2.LookupAttestationsParams.FromString,
            response_serializer=eapi__pb2.LookupAttestationsResponse.
            SerializeToString,
        ),
        'ResyncPerspectiveGraph':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResyncPerspectiveGraph,
            request_deserializer=eapi__pb2.ResyncPerspectiveGraphParams.
            FromString,
            response_serializer=eapi__pb2.ResyncPerspectiveGraphResponse.
            SerializeToString,
        ),
        'SyncStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.SyncStatus,
            request_deserializer=eapi__pb2.SyncParams.FromString,
            response_serializer=eapi__pb2.SyncResponse.SerializeToString,
        ),
        'WaitForSyncComplete':
        grpc.unary_stream_rpc_method_handler(
            servicer.WaitForSyncComplete,
            request_deserializer=eapi__pb2.SyncParams.FromString,
            response_serializer=eapi__pb2.SyncResponse.SerializeToString,
        ),
        'BuildRTreeProof':
        grpc.unary_unary_rpc_method_handler(
            servicer.BuildRTreeProof,
            request_deserializer=eapi__pb2.BuildRTreeProofParams.FromString,
            response_serializer=eapi__pb2.BuildRTreeProofResponse.
            SerializeToString,
        ),
        'VerifyProof':
        grpc.unary_unary_rpc_method_handler(
            servicer.VerifyProof,
            request_deserializer=eapi__pb2.VerifyProofParams.FromString,
            response_serializer=eapi__pb2.VerifyProofResponse.
            SerializeToString,
        ),
        'ListLocations':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListLocations,
            request_deserializer=eapi__pb2.ListLocationsParams.FromString,
            response_serializer=eapi__pb2.ListLocationsResponse.
            SerializeToString,
        ),
        'Inspect':
        grpc.unary_unary_rpc_method_handler(
            servicer.Inspect,
            request_deserializer=eapi__pb2.InspectParams.FromString,
            response_serializer=eapi__pb2.InspectResponse.SerializeToString,
        ),
        'ResolveHash':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResolveHash,
            request_deserializer=eapi__pb2.ResolveHashParams.FromString,
            response_serializer=eapi__pb2.ResolveHashResponse.
            SerializeToString,
        ),
        'EncryptMessage':
        grpc.unary_unary_rpc_method_handler(
            servicer.EncryptMessage,
            request_deserializer=eapi__pb2.EncryptMessageParams.FromString,
            response_serializer=eapi__pb2.EncryptMessageResponse.
            SerializeToString,
        ),
        'DecryptMessage':
        grpc.unary_unary_rpc_method_handler(
            servicer.DecryptMessage,
            request_deserializer=eapi__pb2.DecryptMessageParams.FromString,
            response_serializer=eapi__pb2.DecryptMessageResponse.
            SerializeToString,
        ),
        'CreateNameDeclaration':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateNameDeclaration,
            request_deserializer=eapi__pb2.CreateNameDeclarationParams.
            FromString,
            response_serializer=eapi__pb2.CreateNameDeclarationResponse.
            SerializeToString,
        ),
        'ResolveName':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResolveName,
            request_deserializer=eapi__pb2.ResolveNameParams.FromString,
            response_serializer=eapi__pb2.ResolveNameResponse.
            SerializeToString,
        ),
        'MarkEntityInteresting':
        grpc.unary_unary_rpc_method_handler(
            servicer.MarkEntityInteresting,
            request_deserializer=eapi__pb2.MarkEntityInterestingParams.
            FromString,
            response_serializer=eapi__pb2.MarkEntityInterestingResponse.
            SerializeToString,
        ),
        'ResolveReverseName':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResolveReverseName,
            request_deserializer=eapi__pb2.ResolveReverseNameParams.FromString,
            response_serializer=eapi__pb2.ResolveReverseNameResponse.
            SerializeToString,
        ),
        'Revoke':
        grpc.unary_unary_rpc_method_handler(
            servicer.Revoke,
            request_deserializer=eapi__pb2.RevokeParams.FromString,
            response_serializer=eapi__pb2.RevokeResponse.SerializeToString,
        ),
        'CompactProof':
        grpc.unary_unary_rpc_method_handler(
            servicer.CompactProof,
            request_deserializer=eapi__pb2.CompactProofParams.FromString,
            response_serializer=eapi__pb2.CompactProofResponse.
            SerializeToString,
        ),
        'Sign':
        grpc.unary_unary_rpc_method_handler(
            servicer.Sign,
            request_deserializer=eapi__pb2.SignParams.FromString,
            response_serializer=eapi__pb2.SignResponse.SerializeToString,
        ),
        'VerifySignature':
        grpc.unary_unary_rpc_method_handler(
            servicer.VerifySignature,
            request_deserializer=eapi__pb2.VerifySignatureParams.FromString,
            response_serializer=eapi__pb2.VerifySignatureResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'pb.WAVE', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #26
0
def add_DagsterApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Ping": grpc.unary_unary_rpc_method_handler(
            servicer.Ping,
            request_deserializer=api__pb2.PingRequest.FromString,
            response_serializer=api__pb2.PingReply.SerializeToString,
        ),
        "Heartbeat": grpc.unary_unary_rpc_method_handler(
            servicer.Heartbeat,
            request_deserializer=api__pb2.PingRequest.FromString,
            response_serializer=api__pb2.PingReply.SerializeToString,
        ),
        "StreamingPing": grpc.unary_stream_rpc_method_handler(
            servicer.StreamingPing,
            request_deserializer=api__pb2.StreamingPingRequest.FromString,
            response_serializer=api__pb2.StreamingPingEvent.SerializeToString,
        ),
        "GetServerId": grpc.unary_unary_rpc_method_handler(
            servicer.GetServerId,
            request_deserializer=api__pb2.Empty.FromString,
            response_serializer=api__pb2.GetServerIdReply.SerializeToString,
        ),
        "ExecutionPlanSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.ExecutionPlanSnapshot,
            request_deserializer=api__pb2.ExecutionPlanSnapshotRequest.FromString,
            response_serializer=api__pb2.ExecutionPlanSnapshotReply.SerializeToString,
        ),
        "ListRepositories": grpc.unary_unary_rpc_method_handler(
            servicer.ListRepositories,
            request_deserializer=api__pb2.ListRepositoriesRequest.FromString,
            response_serializer=api__pb2.ListRepositoriesReply.SerializeToString,
        ),
        "ExternalPartitionNames": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionNames,
            request_deserializer=api__pb2.ExternalPartitionNamesRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionNamesReply.SerializeToString,
        ),
        "ExternalPartitionConfig": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionConfig,
            request_deserializer=api__pb2.ExternalPartitionConfigRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionConfigReply.SerializeToString,
        ),
        "ExternalPartitionTags": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionTags,
            request_deserializer=api__pb2.ExternalPartitionTagsRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionTagsReply.SerializeToString,
        ),
        "ExternalPartitionSetExecutionParams": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionSetExecutionParams,
            request_deserializer=api__pb2.ExternalPartitionSetExecutionParamsRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionSetExecutionParamsReply.SerializeToString,
        ),
        "ExternalPipelineSubsetSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPipelineSubsetSnapshot,
            request_deserializer=api__pb2.ExternalPipelineSubsetSnapshotRequest.FromString,
            response_serializer=api__pb2.ExternalPipelineSubsetSnapshotReply.SerializeToString,
        ),
        "ExternalRepository": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalRepository,
            request_deserializer=api__pb2.ExternalRepositoryRequest.FromString,
            response_serializer=api__pb2.ExternalRepositoryReply.SerializeToString,
        ),
        "StreamingExternalRepository": grpc.unary_stream_rpc_method_handler(
            servicer.StreamingExternalRepository,
            request_deserializer=api__pb2.ExternalRepositoryRequest.FromString,
            response_serializer=api__pb2.StreamingExternalRepositoryEvent.SerializeToString,
        ),
        "ExternalScheduleExecution": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalScheduleExecution,
            request_deserializer=api__pb2.ExternalScheduleExecutionRequest.FromString,
            response_serializer=api__pb2.ExternalScheduleExecutionReply.SerializeToString,
        ),
        "ExternalSensorExecution": grpc.unary_unary_rpc_method_handler(
            servicer.ExternalSensorExecution,
            request_deserializer=api__pb2.ExternalSensorExecutionRequest.FromString,
            response_serializer=api__pb2.ExternalSensorExecutionReply.SerializeToString,
        ),
        "ShutdownServer": grpc.unary_unary_rpc_method_handler(
            servicer.ShutdownServer,
            request_deserializer=api__pb2.Empty.FromString,
            response_serializer=api__pb2.ShutdownServerReply.SerializeToString,
        ),
        "CancelExecution": grpc.unary_unary_rpc_method_handler(
            servicer.CancelExecution,
            request_deserializer=api__pb2.CancelExecutionRequest.FromString,
            response_serializer=api__pb2.CancelExecutionReply.SerializeToString,
        ),
        "CanCancelExecution": grpc.unary_unary_rpc_method_handler(
            servicer.CanCancelExecution,
            request_deserializer=api__pb2.CanCancelExecutionRequest.FromString,
            response_serializer=api__pb2.CanCancelExecutionReply.SerializeToString,
        ),
        "StartRun": grpc.unary_unary_rpc_method_handler(
            servicer.StartRun,
            request_deserializer=api__pb2.StartRunRequest.FromString,
            response_serializer=api__pb2.StartRunReply.SerializeToString,
        ),
        "GetCurrentImage": grpc.unary_unary_rpc_method_handler(
            servicer.GetCurrentImage,
            request_deserializer=api__pb2.Empty.FromString,
            response_serializer=api__pb2.GetCurrentImageReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("api.DagsterApi", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Example #27
0
def add_MainServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'getCellColorByFeatures': grpc.unary_unary_rpc_method_handler(
          servicer.getCellColorByFeatures,
          request_deserializer=s__pb2.CellColorByFeaturesRequest.FromString,
          response_serializer=s__pb2.CellColorByFeaturesReply.SerializeToString,
      ),
      'getCellAUCValuesByFeatures': grpc.unary_unary_rpc_method_handler(
          servicer.getCellAUCValuesByFeatures,
          request_deserializer=s__pb2.CellAUCValuesByFeaturesRequest.FromString,
          response_serializer=s__pb2.CellAUCValuesByFeaturesReply.SerializeToString,
      ),
      'getCellMetaData': grpc.unary_unary_rpc_method_handler(
          servicer.getCellMetaData,
          request_deserializer=s__pb2.CellMetaDataRequest.FromString,
          response_serializer=s__pb2.CellMetaDataReply.SerializeToString,
      ),
      'getFeatures': grpc.unary_unary_rpc_method_handler(
          servicer.getFeatures,
          request_deserializer=s__pb2.FeatureRequest.FromString,
          response_serializer=s__pb2.FeatureReply.SerializeToString,
      ),
      'getCoordinates': grpc.unary_unary_rpc_method_handler(
          servicer.getCoordinates,
          request_deserializer=s__pb2.CoordinatesRequest.FromString,
          response_serializer=s__pb2.CoordinatesReply.SerializeToString,
      ),
      'getRegulonMetaData': grpc.unary_unary_rpc_method_handler(
          servicer.getRegulonMetaData,
          request_deserializer=s__pb2.RegulonMetaDataRequest.FromString,
          response_serializer=s__pb2.RegulonMetaDataReply.SerializeToString,
      ),
      'getMarkerGenes': grpc.unary_unary_rpc_method_handler(
          servicer.getMarkerGenes,
          request_deserializer=s__pb2.MarkerGenesRequest.FromString,
          response_serializer=s__pb2.MarkerGenesReply.SerializeToString,
      ),
      'getMyLooms': grpc.unary_unary_rpc_method_handler(
          servicer.getMyLooms,
          request_deserializer=s__pb2.MyLoomsRequest.FromString,
          response_serializer=s__pb2.MyLoomsReply.SerializeToString,
      ),
      'translateLassoSelection': grpc.unary_unary_rpc_method_handler(
          servicer.translateLassoSelection,
          request_deserializer=s__pb2.TranslateLassoSelectionRequest.FromString,
          response_serializer=s__pb2.TranslateLassoSelectionReply.SerializeToString,
      ),
      'getCellIDs': grpc.unary_unary_rpc_method_handler(
          servicer.getCellIDs,
          request_deserializer=s__pb2.CellIDsRequest.FromString,
          response_serializer=s__pb2.CellIDsReply.SerializeToString,
      ),
      'doGeneSetEnrichment': grpc.unary_stream_rpc_method_handler(
          servicer.doGeneSetEnrichment,
          request_deserializer=s__pb2.GeneSetEnrichmentRequest.FromString,
          response_serializer=s__pb2.GeneSetEnrichmentReply.SerializeToString,
      ),
      'getVmax': grpc.unary_unary_rpc_method_handler(
          servicer.getVmax,
          request_deserializer=s__pb2.VmaxRequest.FromString,
          response_serializer=s__pb2.VmaxReply.SerializeToString,
      ),
      'getUUID': grpc.unary_unary_rpc_method_handler(
          servicer.getUUID,
          request_deserializer=s__pb2.UUIDRequest.FromString,
          response_serializer=s__pb2.UUIDReply.SerializeToString,
      ),
      'getRemainingUUIDTime': grpc.unary_unary_rpc_method_handler(
          servicer.getRemainingUUIDTime,
          request_deserializer=s__pb2.RemainingUUIDTimeRequest.FromString,
          response_serializer=s__pb2.RemainingUUIDTimeReply.SerializeToString,
      ),
      'loomUploaded': grpc.unary_unary_rpc_method_handler(
          servicer.loomUploaded,
          request_deserializer=s__pb2.LoomUploadedRequest.FromString,
          response_serializer=s__pb2.LoomUploadedReply.SerializeToString,
      ),
      'getMyGeneSets': grpc.unary_unary_rpc_method_handler(
          servicer.getMyGeneSets,
          request_deserializer=s__pb2.MyGeneSetsRequest.FromString,
          response_serializer=s__pb2.MyGeneSetsReply.SerializeToString,
      ),
      'deleteUserFile': grpc.unary_unary_rpc_method_handler(
          servicer.deleteUserFile,
          request_deserializer=s__pb2.DeleteUserFileRequest.FromString,
          response_serializer=s__pb2.DeleteUserFileReply.SerializeToString,
      ),
      'downloadSubLoom': grpc.unary_stream_rpc_method_handler(
          servicer.downloadSubLoom,
          request_deserializer=s__pb2.DownloadSubLoomRequest.FromString,
          response_serializer=s__pb2.DownloadSubLoomReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'scope.Main', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #28
0
def add_PdmObjectServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetDescendantPdmObjects':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetDescendantPdmObjects,
            request_deserializer=PdmObject__pb2.PdmDescendantObjectRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObjectArray.
            SerializeToString,
        ),
        'GetChildPdmObjects':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetChildPdmObjects,
            request_deserializer=PdmObject__pb2.PdmChildObjectRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObjectArray.
            SerializeToString,
        ),
        'GetAncestorPdmObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetAncestorPdmObject,
            request_deserializer=PdmObject__pb2.PdmParentObjectRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
        ),
        'CreateChildPdmObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateChildPdmObject,
            request_deserializer=PdmObject__pb2.CreatePdmChildObjectRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
        ),
        'UpdateExistingPdmObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateExistingPdmObject,
            request_deserializer=PdmObject__pb2.PdmObject.FromString,
            response_serializer=Definitions__pb2.Empty.SerializeToString,
        ),
        'CallPdmObjectGetter':
        grpc.unary_stream_rpc_method_handler(
            servicer.CallPdmObjectGetter,
            request_deserializer=PdmObject__pb2.PdmObjectGetterRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObjectGetterReply.
            SerializeToString,
        ),
        'CallPdmObjectSetter':
        grpc.stream_unary_rpc_method_handler(
            servicer.CallPdmObjectSetter,
            request_deserializer=PdmObject__pb2.PdmObjectSetterChunk.
            FromString,
            response_serializer=Definitions__pb2.ClientToServerStreamReply.
            SerializeToString,
        ),
        'CallPdmObjectMethod':
        grpc.unary_unary_rpc_method_handler(
            servicer.CallPdmObjectMethod,
            request_deserializer=PdmObject__pb2.PdmObjectMethodRequest.
            FromString,
            response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'rips.PdmObjectService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #29
0
def add_VitessServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Execute': grpc.unary_unary_rpc_method_handler(
          servicer.Execute,
          request_deserializer=vtgate__pb2.ExecuteRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteResponse.SerializeToString,
      ),
      'ExecuteShards': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteShards,
          request_deserializer=vtgate__pb2.ExecuteShardsRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteShardsResponse.SerializeToString,
      ),
      'ExecuteKeyspaceIds': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteKeyspaceIds,
          request_deserializer=vtgate__pb2.ExecuteKeyspaceIdsRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteKeyspaceIdsResponse.SerializeToString,
      ),
      'ExecuteKeyRanges': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteKeyRanges,
          request_deserializer=vtgate__pb2.ExecuteKeyRangesRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteKeyRangesResponse.SerializeToString,
      ),
      'ExecuteEntityIds': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteEntityIds,
          request_deserializer=vtgate__pb2.ExecuteEntityIdsRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteEntityIdsResponse.SerializeToString,
      ),
      'ExecuteBatchShards': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteBatchShards,
          request_deserializer=vtgate__pb2.ExecuteBatchShardsRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteBatchShardsResponse.SerializeToString,
      ),
      'ExecuteBatchKeyspaceIds': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteBatchKeyspaceIds,
          request_deserializer=vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.FromString,
          response_serializer=vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString,
      ),
      'StreamExecute': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecute,
          request_deserializer=vtgate__pb2.StreamExecuteRequest.FromString,
          response_serializer=vtgate__pb2.StreamExecuteResponse.SerializeToString,
      ),
      'StreamExecuteShards': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecuteShards,
          request_deserializer=vtgate__pb2.StreamExecuteShardsRequest.FromString,
          response_serializer=vtgate__pb2.StreamExecuteShardsResponse.SerializeToString,
      ),
      'StreamExecuteKeyspaceIds': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecuteKeyspaceIds,
          request_deserializer=vtgate__pb2.StreamExecuteKeyspaceIdsRequest.FromString,
          response_serializer=vtgate__pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString,
      ),
      'StreamExecuteKeyRanges': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecuteKeyRanges,
          request_deserializer=vtgate__pb2.StreamExecuteKeyRangesRequest.FromString,
          response_serializer=vtgate__pb2.StreamExecuteKeyRangesResponse.SerializeToString,
      ),
      'Begin': grpc.unary_unary_rpc_method_handler(
          servicer.Begin,
          request_deserializer=vtgate__pb2.BeginRequest.FromString,
          response_serializer=vtgate__pb2.BeginResponse.SerializeToString,
      ),
      'Commit': grpc.unary_unary_rpc_method_handler(
          servicer.Commit,
          request_deserializer=vtgate__pb2.CommitRequest.FromString,
          response_serializer=vtgate__pb2.CommitResponse.SerializeToString,
      ),
      'Rollback': grpc.unary_unary_rpc_method_handler(
          servicer.Rollback,
          request_deserializer=vtgate__pb2.RollbackRequest.FromString,
          response_serializer=vtgate__pb2.RollbackResponse.SerializeToString,
      ),
      'SplitQuery': grpc.unary_unary_rpc_method_handler(
          servicer.SplitQuery,
          request_deserializer=vtgate__pb2.SplitQueryRequest.FromString,
          response_serializer=vtgate__pb2.SplitQueryResponse.SerializeToString,
      ),
      'GetSrvKeyspace': grpc.unary_unary_rpc_method_handler(
          servicer.GetSrvKeyspace,
          request_deserializer=vtgate__pb2.GetSrvKeyspaceRequest.FromString,
          response_serializer=vtgate__pb2.GetSrvKeyspaceResponse.SerializeToString,
      ),
      'UpdateStream': grpc.unary_stream_rpc_method_handler(
          servicer.UpdateStream,
          request_deserializer=vtgate__pb2.UpdateStreamRequest.FromString,
          response_serializer=vtgate__pb2.UpdateStreamResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'vtgateservice.Vitess', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
Example #30
0
def add_DeployServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'doDeploy':
        grpc.unary_unary_rpc_method_handler(
            servicer.doDeploy,
            request_deserializer=CasperMessage__pb2.DeployDataProto.FromString,
            response_serializer=DeployServiceV1__pb2.DeployResponse.
            SerializeToString,
        ),
        'getBlock':
        grpc.unary_unary_rpc_method_handler(
            servicer.getBlock,
            request_deserializer=DeployServiceCommon__pb2.BlockQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.BlockResponse.
            SerializeToString,
        ),
        'visualizeDag':
        grpc.unary_stream_rpc_method_handler(
            servicer.visualizeDag,
            request_deserializer=DeployServiceCommon__pb2.VisualizeDagQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.VisualizeBlocksResponse.
            SerializeToString,
        ),
        'machineVerifiableDag':
        grpc.unary_unary_rpc_method_handler(
            servicer.machineVerifiableDag,
            request_deserializer=DeployServiceCommon__pb2.MachineVerifyQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.MachineVerifyResponse.
            SerializeToString,
        ),
        'showMainChain':
        grpc.unary_stream_rpc_method_handler(
            servicer.showMainChain,
            request_deserializer=DeployServiceCommon__pb2.BlocksQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.BlockInfoResponse.
            SerializeToString,
        ),
        'getBlocks':
        grpc.unary_stream_rpc_method_handler(
            servicer.getBlocks,
            request_deserializer=DeployServiceCommon__pb2.BlocksQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.BlockInfoResponse.
            SerializeToString,
        ),
        'listenForDataAtName':
        grpc.unary_unary_rpc_method_handler(
            servicer.listenForDataAtName,
            request_deserializer=DeployServiceCommon__pb2.DataAtNameQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.ListeningNameDataResponse.
            SerializeToString,
        ),
        'listenForContinuationAtName':
        grpc.unary_unary_rpc_method_handler(
            servicer.listenForContinuationAtName,
            request_deserializer=DeployServiceCommon__pb2.
            ContinuationAtNameQuery.FromString,
            response_serializer=DeployServiceV1__pb2.
            ContinuationAtNameResponse.SerializeToString,
        ),
        'findDeploy':
        grpc.unary_unary_rpc_method_handler(
            servicer.findDeploy,
            request_deserializer=DeployServiceCommon__pb2.FindDeployQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.FindDeployResponse.
            SerializeToString,
        ),
        'previewPrivateNames':
        grpc.unary_unary_rpc_method_handler(
            servicer.previewPrivateNames,
            request_deserializer=DeployServiceCommon__pb2.
            PrivateNamePreviewQuery.FromString,
            response_serializer=DeployServiceV1__pb2.
            PrivateNamePreviewResponse.SerializeToString,
        ),
        'lastFinalizedBlock':
        grpc.unary_unary_rpc_method_handler(
            servicer.lastFinalizedBlock,
            request_deserializer=DeployServiceCommon__pb2.
            LastFinalizedBlockQuery.FromString,
            response_serializer=DeployServiceV1__pb2.
            LastFinalizedBlockResponse.SerializeToString,
        ),
        'isFinalized':
        grpc.unary_unary_rpc_method_handler(
            servicer.isFinalized,
            request_deserializer=DeployServiceCommon__pb2.IsFinalizedQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.IsFinalizedResponse.
            SerializeToString,
        ),
        'bondStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.bondStatus,
            request_deserializer=DeployServiceCommon__pb2.BondStatusQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.BondStatusResponse.
            SerializeToString,
        ),
        'exploratoryDeploy':
        grpc.unary_unary_rpc_method_handler(
            servicer.exploratoryDeploy,
            request_deserializer=DeployServiceCommon__pb2.
            ExploratoryDeployQuery.FromString,
            response_serializer=DeployServiceV1__pb2.ExploratoryDeployResponse.
            SerializeToString,
        ),
        'getBlocksByHeights':
        grpc.unary_stream_rpc_method_handler(
            servicer.getBlocksByHeights,
            request_deserializer=DeployServiceCommon__pb2.BlocksQueryByHeight.
            FromString,
            response_serializer=DeployServiceV1__pb2.BlockInfoResponse.
            SerializeToString,
        ),
        'getEventByHash':
        grpc.unary_unary_rpc_method_handler(
            servicer.getEventByHash,
            request_deserializer=DeployServiceCommon__pb2.BlockQuery.
            FromString,
            response_serializer=DeployServiceV1__pb2.EventInfoResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'casper.v1.DeployService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #31
0
def add_RefServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'FindDefaultBranchName':
        grpc.unary_unary_rpc_method_handler(
            servicer.FindDefaultBranchName,
            request_deserializer=ref__pb2.FindDefaultBranchNameRequest.
            FromString,
            response_serializer=ref__pb2.FindDefaultBranchNameResponse.
            SerializeToString,
        ),
        'FindAllBranchNames':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindAllBranchNames,
            request_deserializer=ref__pb2.FindAllBranchNamesRequest.FromString,
            response_serializer=ref__pb2.FindAllBranchNamesResponse.
            SerializeToString,
        ),
        'FindAllTagNames':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindAllTagNames,
            request_deserializer=ref__pb2.FindAllTagNamesRequest.FromString,
            response_serializer=ref__pb2.FindAllTagNamesResponse.
            SerializeToString,
        ),
        'FindRefName':
        grpc.unary_unary_rpc_method_handler(
            servicer.FindRefName,
            request_deserializer=ref__pb2.FindRefNameRequest.FromString,
            response_serializer=ref__pb2.FindRefNameResponse.SerializeToString,
        ),
        'FindLocalBranches':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindLocalBranches,
            request_deserializer=ref__pb2.FindLocalBranchesRequest.FromString,
            response_serializer=ref__pb2.FindLocalBranchesResponse.
            SerializeToString,
        ),
        'FindAllBranches':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindAllBranches,
            request_deserializer=ref__pb2.FindAllBranchesRequest.FromString,
            response_serializer=ref__pb2.FindAllBranchesResponse.
            SerializeToString,
        ),
        'FindAllTags':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindAllTags,
            request_deserializer=ref__pb2.FindAllTagsRequest.FromString,
            response_serializer=ref__pb2.FindAllTagsResponse.SerializeToString,
        ),
        'FindAllRemoteBranches':
        grpc.unary_stream_rpc_method_handler(
            servicer.FindAllRemoteBranches,
            request_deserializer=ref__pb2.FindAllRemoteBranchesRequest.
            FromString,
            response_serializer=ref__pb2.FindAllRemoteBranchesResponse.
            SerializeToString,
        ),
        'RefExists':
        grpc.unary_unary_rpc_method_handler(
            servicer.RefExists,
            request_deserializer=ref__pb2.RefExistsRequest.FromString,
            response_serializer=ref__pb2.RefExistsResponse.SerializeToString,
        ),
        'CreateBranch':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateBranch,
            request_deserializer=ref__pb2.CreateBranchRequest.FromString,
            response_serializer=ref__pb2.CreateBranchResponse.
            SerializeToString,
        ),
        'DeleteBranch':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBranch,
            request_deserializer=ref__pb2.DeleteBranchRequest.FromString,
            response_serializer=ref__pb2.DeleteBranchResponse.
            SerializeToString,
        ),
        'FindBranch':
        grpc.unary_unary_rpc_method_handler(
            servicer.FindBranch,
            request_deserializer=ref__pb2.FindBranchRequest.FromString,
            response_serializer=ref__pb2.FindBranchResponse.SerializeToString,
        ),
        'DeleteRefs':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteRefs,
            request_deserializer=ref__pb2.DeleteRefsRequest.FromString,
            response_serializer=ref__pb2.DeleteRefsResponse.SerializeToString,
        ),
        'ListBranchNamesContainingCommit':
        grpc.unary_stream_rpc_method_handler(
            servicer.ListBranchNamesContainingCommit,
            request_deserializer=ref__pb2.
            ListBranchNamesContainingCommitRequest.FromString,
            response_serializer=ref__pb2.
            ListBranchNamesContainingCommitResponse.SerializeToString,
        ),
        'ListTagNamesContainingCommit':
        grpc.unary_stream_rpc_method_handler(
            servicer.ListTagNamesContainingCommit,
            request_deserializer=ref__pb2.ListTagNamesContainingCommitRequest.
            FromString,
            response_serializer=ref__pb2.ListTagNamesContainingCommitResponse.
            SerializeToString,
        ),
        'GetTagMessages':
        grpc.unary_stream_rpc_method_handler(
            servicer.GetTagMessages,
            request_deserializer=ref__pb2.GetTagMessagesRequest.FromString,
            response_serializer=ref__pb2.GetTagMessagesResponse.
            SerializeToString,
        ),
        'ListNewCommits':
        grpc.unary_stream_rpc_method_handler(
            servicer.ListNewCommits,
            request_deserializer=ref__pb2.ListNewCommitsRequest.FromString,
            response_serializer=ref__pb2.ListNewCommitsResponse.
            SerializeToString,
        ),
        'ListNewBlobs':
        grpc.unary_stream_rpc_method_handler(
            servicer.ListNewBlobs,
            request_deserializer=ref__pb2.ListNewBlobsRequest.FromString,
            response_serializer=ref__pb2.ListNewBlobsResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'gitaly.RefService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_EngineManagerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'EngineCreate':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineCreate,
            request_deserializer=rpc__pb2.EngineCreateRequest.FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'EngineDelete':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineDelete,
            request_deserializer=rpc__pb2.EngineRequest.FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'EngineGet':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineGet,
            request_deserializer=rpc__pb2.EngineRequest.FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'EngineList':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineList,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=rpc__pb2.EngineListResponse.SerializeToString,
        ),
        'EngineUpgrade':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineUpgrade,
            request_deserializer=rpc__pb2.EngineUpgradeRequest.FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'EngineLog':
        grpc.unary_stream_rpc_method_handler(
            servicer.EngineLog,
            request_deserializer=rpc__pb2.LogRequest.FromString,
            response_serializer=rpc__pb2.LogResponse.SerializeToString,
        ),
        'EngineWatch':
        grpc.unary_stream_rpc_method_handler(
            servicer.EngineWatch,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'EngineExpand':
        grpc.unary_unary_rpc_method_handler(
            servicer.EngineExpand,
            request_deserializer=rpc__pb2.EngineExpandRequest.FromString,
            response_serializer=rpc__pb2.EngineResponse.SerializeToString,
        ),
        'FrontendStart':
        grpc.unary_unary_rpc_method_handler(
            servicer.FrontendStart,
            request_deserializer=rpc__pb2.FrontendStartRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'FrontendShutdown':
        grpc.unary_unary_rpc_method_handler(
            servicer.FrontendShutdown,
            request_deserializer=rpc__pb2.EngineRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'FrontendStartCallback':
        grpc.unary_unary_rpc_method_handler(
            servicer.FrontendStartCallback,
            request_deserializer=rpc__pb2.EngineRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'FrontendShutdownCallback':
        grpc.unary_unary_rpc_method_handler(
            servicer.FrontendShutdownCallback,
            request_deserializer=rpc__pb2.EngineRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'EngineManagerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #33
0
def add_DagsterApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Ping': grpc.unary_unary_rpc_method_handler(
            servicer.Ping,
            request_deserializer=api__pb2.PingRequest.FromString,
            response_serializer=api__pb2.PingReply.SerializeToString,
        ),
        'Heartbeat': grpc.unary_unary_rpc_method_handler(
            servicer.Heartbeat,
            request_deserializer=api__pb2.PingRequest.FromString,
            response_serializer=api__pb2.PingReply.SerializeToString,
        ),
        'StreamingPing': grpc.unary_stream_rpc_method_handler(
            servicer.StreamingPing,
            request_deserializer=api__pb2.StreamingPingRequest.FromString,
            response_serializer=api__pb2.StreamingPingEvent.SerializeToString,
        ),
        'ExecutionPlanSnapshot': grpc.unary_unary_rpc_method_handler(
            servicer.ExecutionPlanSnapshot,
            request_deserializer=api__pb2.ExecutionPlanSnapshotRequest.FromString,
            response_serializer=api__pb2.ExecutionPlanSnapshotReply.SerializeToString,
        ),
        'ListRepositories': grpc.unary_unary_rpc_method_handler(
            servicer.ListRepositories,
            request_deserializer=api__pb2.ListRepositoriesRequest.FromString,
            response_serializer=api__pb2.ListRepositoriesReply.SerializeToString,
        ),
        'ExternalPartitionNames': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionNames,
            request_deserializer=api__pb2.ExternalPartitionNamesRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionNamesReply.SerializeToString,
        ),
        'ExternalPartitionConfig': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionConfig,
            request_deserializer=api__pb2.ExternalPartitionConfigRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionConfigReply.SerializeToString,
        ),
        'ExternalPartitionTags': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPartitionTags,
            request_deserializer=api__pb2.ExternalPartitionTagsRequest.FromString,
            response_serializer=api__pb2.ExternalPartitionTagsReply.SerializeToString,
        ),
        'ExternalPipelineSubsetSnapshot': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalPipelineSubsetSnapshot,
            request_deserializer=api__pb2.ExternalPipelineSubsetSnapshotRequest.FromString,
            response_serializer=api__pb2.ExternalPipelineSubsetSnapshotReply.SerializeToString,
        ),
        'ExternalRepository': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalRepository,
            request_deserializer=api__pb2.ExternalRepositoryRequest.FromString,
            response_serializer=api__pb2.ExternalRepositoryReply.SerializeToString,
        ),
        'ExternalScheduleExecution': grpc.unary_unary_rpc_method_handler(
            servicer.ExternalScheduleExecution,
            request_deserializer=api__pb2.ExternalScheduleExecutionRequest.FromString,
            response_serializer=api__pb2.ExternalScheduleExecutionReply.SerializeToString,
        ),
        'ShutdownServer': grpc.unary_unary_rpc_method_handler(
            servicer.ShutdownServer,
            request_deserializer=api__pb2.Empty.FromString,
            response_serializer=api__pb2.ShutdownServerReply.SerializeToString,
        ),
        'ExecuteRun': grpc.unary_stream_rpc_method_handler(
            servicer.ExecuteRun,
            request_deserializer=api__pb2.ExecuteRunRequest.FromString,
            response_serializer=api__pb2.ExecuteRunEvent.SerializeToString,
        ),
        'CancelExecution': grpc.unary_unary_rpc_method_handler(
            servicer.CancelExecution,
            request_deserializer=api__pb2.CancelExecutionRequest.FromString,
            response_serializer=api__pb2.CancelExecutionReply.SerializeToString,
        ),
        'CanCancelExecution': grpc.unary_unary_rpc_method_handler(
            servicer.CanCancelExecution,
            request_deserializer=api__pb2.CanCancelExecutionRequest.FromString,
            response_serializer=api__pb2.CanCancelExecutionReply.SerializeToString,
        ),
        'StartRun': grpc.unary_unary_rpc_method_handler(
            servicer.StartRun,
            request_deserializer=api__pb2.StartRunRequest.FromString,
            response_serializer=api__pb2.StartRunReply.SerializeToString,
        ),
        'GetCurrentImage': grpc.unary_unary_rpc_method_handler(
            servicer.GetCurrentImage,
            request_deserializer=api__pb2.Empty.FromString,
            response_serializer=api__pb2.GetCurrentImageReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler('api.DagsterApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Example #34
0
def add_KiwoomOpenApiServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Call':
        grpc.unary_unary_rpc_method_handler(
            servicer.Call,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallResponse.SerializeToString,
        ),
        'Listen':
        grpc.unary_stream_rpc_method_handler(
            servicer.Listen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'BidirectionalListen':
        grpc.stream_stream_rpc_method_handler(
            servicer.BidirectionalListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            BidirectionalListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'CustomListen':
        grpc.unary_stream_rpc_method_handler(
            servicer.CustomListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'CustomCallAndListen':
        grpc.unary_stream_rpc_method_handler(
            servicer.CustomCallAndListen,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallAndListenRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            CallAndListenResponse.SerializeToString,
        ),
        'LoginCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.LoginCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            LoginRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'TransactionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.TransactionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            TransactionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'OrderCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.OrderCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            OrderRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'RealCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.RealCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            RealRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'LoadConditionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.LoadConditionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            LoadConditionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'ConditionCall':
        grpc.unary_stream_rpc_method_handler(
            servicer.ConditionCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ConditionRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'BidirectionalRealCall':
        grpc.stream_stream_rpc_method_handler(
            servicer.BidirectionalRealCall,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            BidirectionalRealRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            ListenResponse.SerializeToString,
        ),
        'SetLogLevel':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetLogLevel,
            request_deserializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            SetLogLevelRequest.FromString,
            response_serializer=koapy_dot_grpc_dot_KiwoomOpenApiService__pb2.
            SetLogLevelResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'koapy.grpc.KiwoomOpenApiService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_InterfaceControllerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'do_task':
        grpc.unary_unary_rpc_method_handler(
            servicer.do_task,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceTaskSubmit.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceDefaultResponse.SerializeToString,
        ),
        'get_last_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_last_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceDefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceStringResponse.SerializeToString,
        ),
        'get_models':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_models,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceDefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceStringResponse.SerializeToString,
        ),
        'stop_task':
        grpc.unary_unary_rpc_method_handler(
            servicer.stop_task,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceDefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            InterfaceDefaultResponse.SerializeToString,
        ),
        'get_task_request':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_task_request,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            TaskRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            TaskResponse.SerializeToString,
        ),
        'fetch_model_request':
        grpc.unary_stream_rpc_method_handler(
            servicer.fetch_model_request,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            Model.SerializeToString,
        ),
        'train_model_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.train_model_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'send_model_update_response':
        grpc.stream_unary_rpc_method_handler(
            servicer.send_model_update_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            ModelUpdate.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'send_datasets':
        grpc.unary_unary_rpc_method_handler(
            servicer.send_datasets,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'send_validation_loss_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.send_validation_loss_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            Loss.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'send_train_loss_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.send_train_loss_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            Loss.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'send_test_loss_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.send_test_loss_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            Loss.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'test_connection':
        grpc.unary_unary_rpc_method_handler(
            servicer.test_connection,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'stopped_experiment_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.stopped_experiment_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'failed_experiment_response':
        grpc.unary_unary_rpc_method_handler(
            servicer.failed_experiment_response,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultResponse.SerializeToString,
        ),
        'stop_experiment':
        grpc.unary_unary_rpc_method_handler(
            servicer.stop_experiment,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            ExperimentResponse.SerializeToString,
        ),
        'start_experiment':
        grpc.unary_unary_rpc_method_handler(
            servicer.start_experiment,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            ExperimentResponse.SerializeToString,
        ),
        'get_latest_global_model':
        grpc.unary_unary_rpc_method_handler(
            servicer.get_latest_global_model,
            request_deserializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            DefaultRequest.FromString,
            response_serializer=
            client__interface__clone_dot_interface__utils_dot_interface__pb2.
            ModelIdResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'interface.InterfaceController', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_SeabirdServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StreamEvents': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamEvents,
                    request_deserializer=seabird__pb2.StreamEventsRequest.FromString,
                    response_serializer=seabird__pb2.Event.SerializeToString,
            ),
            'PerformAction': grpc.unary_unary_rpc_method_handler(
                    servicer.PerformAction,
                    request_deserializer=seabird__pb2.PerformActionRequest.FromString,
                    response_serializer=seabird__pb2.PerformActionResponse.SerializeToString,
            ),
            'PerformPrivateAction': grpc.unary_unary_rpc_method_handler(
                    servicer.PerformPrivateAction,
                    request_deserializer=seabird__pb2.PerformPrivateActionRequest.FromString,
                    response_serializer=seabird__pb2.PerformPrivateActionResponse.SerializeToString,
            ),
            'SendMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendMessage,
                    request_deserializer=seabird__pb2.SendMessageRequest.FromString,
                    response_serializer=seabird__pb2.SendMessageResponse.SerializeToString,
            ),
            'SendPrivateMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendPrivateMessage,
                    request_deserializer=seabird__pb2.SendPrivateMessageRequest.FromString,
                    response_serializer=seabird__pb2.SendPrivateMessageResponse.SerializeToString,
            ),
            'JoinChannel': grpc.unary_unary_rpc_method_handler(
                    servicer.JoinChannel,
                    request_deserializer=seabird__pb2.JoinChannelRequest.FromString,
                    response_serializer=seabird__pb2.JoinChannelResponse.SerializeToString,
            ),
            'LeaveChannel': grpc.unary_unary_rpc_method_handler(
                    servicer.LeaveChannel,
                    request_deserializer=seabird__pb2.LeaveChannelRequest.FromString,
                    response_serializer=seabird__pb2.LeaveChannelResponse.SerializeToString,
            ),
            'UpdateChannelInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateChannelInfo,
                    request_deserializer=seabird__pb2.UpdateChannelInfoRequest.FromString,
                    response_serializer=seabird__pb2.UpdateChannelInfoResponse.SerializeToString,
            ),
            'ListBackends': grpc.unary_unary_rpc_method_handler(
                    servicer.ListBackends,
                    request_deserializer=seabird__pb2.ListBackendsRequest.FromString,
                    response_serializer=seabird__pb2.ListBackendsResponse.SerializeToString,
            ),
            'GetBackendInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBackendInfo,
                    request_deserializer=seabird__pb2.BackendInfoRequest.FromString,
                    response_serializer=seabird__pb2.BackendInfoResponse.SerializeToString,
            ),
            'ListChannels': grpc.unary_unary_rpc_method_handler(
                    servicer.ListChannels,
                    request_deserializer=seabird__pb2.ListChannelsRequest.FromString,
                    response_serializer=seabird__pb2.ListChannelsResponse.SerializeToString,
            ),
            'GetChannelInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetChannelInfo,
                    request_deserializer=seabird__pb2.ChannelInfoRequest.FromString,
                    response_serializer=seabird__pb2.ChannelInfoResponse.SerializeToString,
            ),
            'GetCoreInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCoreInfo,
                    request_deserializer=seabird__pb2.CoreInfoRequest.FromString,
                    response_serializer=seabird__pb2.CoreInfoResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'seabird.Seabird', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Example #37
0
def add_FtpServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Reset':
        grpc.unary_unary_rpc_method_handler(
            servicer.Reset,
            request_deserializer=ftp_dot_ftp__pb2.ResetRequest.FromString,
            response_serializer=ftp_dot_ftp__pb2.ResetResponse.
            SerializeToString,
        ),
        'SubscribeDownload':
        grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeDownload,
            request_deserializer=ftp_dot_ftp__pb2.SubscribeDownloadRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.DownloadResponse.
            SerializeToString,
        ),
        'SubscribeUpload':
        grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeUpload,
            request_deserializer=ftp_dot_ftp__pb2.SubscribeUploadRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.UploadResponse.
            SerializeToString,
        ),
        'ListDirectory':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListDirectory,
            request_deserializer=ftp_dot_ftp__pb2.ListDirectoryRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.ListDirectoryResponse.
            SerializeToString,
        ),
        'CreateDirectory':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateDirectory,
            request_deserializer=ftp_dot_ftp__pb2.CreateDirectoryRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.CreateDirectoryResponse.
            SerializeToString,
        ),
        'RemoveDirectory':
        grpc.unary_unary_rpc_method_handler(
            servicer.RemoveDirectory,
            request_deserializer=ftp_dot_ftp__pb2.RemoveDirectoryRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.RemoveDirectoryResponse.
            SerializeToString,
        ),
        'RemoveFile':
        grpc.unary_unary_rpc_method_handler(
            servicer.RemoveFile,
            request_deserializer=ftp_dot_ftp__pb2.RemoveFileRequest.FromString,
            response_serializer=ftp_dot_ftp__pb2.RemoveFileResponse.
            SerializeToString,
        ),
        'Rename':
        grpc.unary_unary_rpc_method_handler(
            servicer.Rename,
            request_deserializer=ftp_dot_ftp__pb2.RenameRequest.FromString,
            response_serializer=ftp_dot_ftp__pb2.RenameResponse.
            SerializeToString,
        ),
        'AreFilesIdentical':
        grpc.unary_unary_rpc_method_handler(
            servicer.AreFilesIdentical,
            request_deserializer=ftp_dot_ftp__pb2.AreFilesIdenticalRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.AreFilesIdenticalResponse.
            SerializeToString,
        ),
        'SetRootDirectory':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetRootDirectory,
            request_deserializer=ftp_dot_ftp__pb2.SetRootDirectoryRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.SetRootDirectoryResponse.
            SerializeToString,
        ),
        'SetTargetCompid':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetTargetCompid,
            request_deserializer=ftp_dot_ftp__pb2.SetTargetCompidRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.SetTargetCompidResponse.
            SerializeToString,
        ),
        'GetOurCompid':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetOurCompid,
            request_deserializer=ftp_dot_ftp__pb2.GetOurCompidRequest.
            FromString,
            response_serializer=ftp_dot_ftp__pb2.GetOurCompidResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'mavsdk.rpc.ftp.FtpService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_BeaconNodeValidatorServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetDuties':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetDuties,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            DutiesRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            DutiesResponse.SerializeToString,
        ),
        'StreamDuties':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamDuties,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            DutiesRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            DutiesResponse.SerializeToString,
        ),
        'DomainData':
        grpc.unary_unary_rpc_method_handler(
            servicer.DomainData,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            DomainRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            DomainResponse.SerializeToString,
        ),
        'WaitForChainStart':
        grpc.unary_stream_rpc_method_handler(
            servicer.WaitForChainStart,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.
            FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ChainStartResponse.SerializeToString,
        ),
        'WaitForActivation':
        grpc.unary_stream_rpc_method_handler(
            servicer.WaitForActivation,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorActivationRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorActivationResponse.SerializeToString,
        ),
        'ValidatorIndex':
        grpc.unary_unary_rpc_method_handler(
            servicer.ValidatorIndex,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorIndexRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorIndexResponse.SerializeToString,
        ),
        'ValidatorStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.ValidatorStatus,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorStatusRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ValidatorStatusResponse.SerializeToString,
        ),
        'MultipleValidatorStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.MultipleValidatorStatus,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            MultipleValidatorStatusRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            MultipleValidatorStatusResponse.SerializeToString,
        ),
        'GetBlock':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetBlock,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            BlockRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_beacon__block__pb2.
            BeaconBlock.SerializeToString,
        ),
        'ProposeBlock':
        grpc.unary_unary_rpc_method_handler(
            servicer.ProposeBlock,
            request_deserializer=eth_dot_v1alpha1_dot_beacon__block__pb2.
            SignedBeaconBlock.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ProposeResponse.SerializeToString,
        ),
        'GetAttestationData':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetAttestationData,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            AttestationDataRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_attestation__pb2.
            AttestationData.SerializeToString,
        ),
        'ProposeAttestation':
        grpc.unary_unary_rpc_method_handler(
            servicer.ProposeAttestation,
            request_deserializer=eth_dot_v1alpha1_dot_attestation__pb2.
            Attestation.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            AttestResponse.SerializeToString,
        ),
        'SubmitAggregateSelectionProof':
        grpc.unary_unary_rpc_method_handler(
            servicer.SubmitAggregateSelectionProof,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            AggregateSelectionRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            AggregateSelectionResponse.SerializeToString,
        ),
        'SubmitSignedAggregateSelectionProof':
        grpc.unary_unary_rpc_method_handler(
            servicer.SubmitSignedAggregateSelectionProof,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            SignedAggregateSubmitRequest.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            SignedAggregateSubmitResponse.SerializeToString,
        ),
        'ProposeExit':
        grpc.unary_unary_rpc_method_handler(
            servicer.ProposeExit,
            request_deserializer=eth_dot_v1alpha1_dot_beacon__block__pb2.
            SignedVoluntaryExit.FromString,
            response_serializer=eth_dot_v1alpha1_dot_validator__pb2.
            ProposeExitResponse.SerializeToString,
        ),
        'SubscribeCommitteeSubnets':
        grpc.unary_unary_rpc_method_handler(
            servicer.SubscribeCommitteeSubnets,
            request_deserializer=eth_dot_v1alpha1_dot_validator__pb2.
            CommitteeSubnetsSubscribeRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'ethereum.eth.v1alpha1.BeaconNodeValidator', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #39
0
def add_RouterServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'SendPaymentV2':
        grpc.unary_stream_rpc_method_handler(
            servicer.SendPaymentV2,
            request_deserializer=router__pb2.SendPaymentRequest.FromString,
            response_serializer=rpc__pb2.Payment.SerializeToString,
        ),
        'TrackPaymentV2':
        grpc.unary_stream_rpc_method_handler(
            servicer.TrackPaymentV2,
            request_deserializer=router__pb2.TrackPaymentRequest.FromString,
            response_serializer=rpc__pb2.Payment.SerializeToString,
        ),
        'EstimateRouteFee':
        grpc.unary_unary_rpc_method_handler(
            servicer.EstimateRouteFee,
            request_deserializer=router__pb2.RouteFeeRequest.FromString,
            response_serializer=router__pb2.RouteFeeResponse.SerializeToString,
        ),
        'SendToRoute':
        grpc.unary_unary_rpc_method_handler(
            servicer.SendToRoute,
            request_deserializer=router__pb2.SendToRouteRequest.FromString,
            response_serializer=router__pb2.SendToRouteResponse.
            SerializeToString,
        ),
        'SendToRouteV2':
        grpc.unary_unary_rpc_method_handler(
            servicer.SendToRouteV2,
            request_deserializer=router__pb2.SendToRouteRequest.FromString,
            response_serializer=rpc__pb2.HTLCAttempt.SerializeToString,
        ),
        'ResetMissionControl':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResetMissionControl,
            request_deserializer=router__pb2.ResetMissionControlRequest.
            FromString,
            response_serializer=router__pb2.ResetMissionControlResponse.
            SerializeToString,
        ),
        'QueryMissionControl':
        grpc.unary_unary_rpc_method_handler(
            servicer.QueryMissionControl,
            request_deserializer=router__pb2.QueryMissionControlRequest.
            FromString,
            response_serializer=router__pb2.QueryMissionControlResponse.
            SerializeToString,
        ),
        'XImportMissionControl':
        grpc.unary_unary_rpc_method_handler(
            servicer.XImportMissionControl,
            request_deserializer=router__pb2.XImportMissionControlRequest.
            FromString,
            response_serializer=router__pb2.XImportMissionControlResponse.
            SerializeToString,
        ),
        'GetMissionControlConfig':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetMissionControlConfig,
            request_deserializer=router__pb2.GetMissionControlConfigRequest.
            FromString,
            response_serializer=router__pb2.GetMissionControlConfigResponse.
            SerializeToString,
        ),
        'SetMissionControlConfig':
        grpc.unary_unary_rpc_method_handler(
            servicer.SetMissionControlConfig,
            request_deserializer=router__pb2.SetMissionControlConfigRequest.
            FromString,
            response_serializer=router__pb2.SetMissionControlConfigResponse.
            SerializeToString,
        ),
        'QueryProbability':
        grpc.unary_unary_rpc_method_handler(
            servicer.QueryProbability,
            request_deserializer=router__pb2.QueryProbabilityRequest.
            FromString,
            response_serializer=router__pb2.QueryProbabilityResponse.
            SerializeToString,
        ),
        'BuildRoute':
        grpc.unary_unary_rpc_method_handler(
            servicer.BuildRoute,
            request_deserializer=router__pb2.BuildRouteRequest.FromString,
            response_serializer=router__pb2.BuildRouteResponse.
            SerializeToString,
        ),
        'SubscribeHtlcEvents':
        grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeHtlcEvents,
            request_deserializer=router__pb2.SubscribeHtlcEventsRequest.
            FromString,
            response_serializer=router__pb2.HtlcEvent.SerializeToString,
        ),
        'SendPayment':
        grpc.unary_stream_rpc_method_handler(
            servicer.SendPayment,
            request_deserializer=router__pb2.SendPaymentRequest.FromString,
            response_serializer=router__pb2.PaymentStatus.SerializeToString,
        ),
        'TrackPayment':
        grpc.unary_stream_rpc_method_handler(
            servicer.TrackPayment,
            request_deserializer=router__pb2.TrackPaymentRequest.FromString,
            response_serializer=router__pb2.PaymentStatus.SerializeToString,
        ),
        'HtlcInterceptor':
        grpc.stream_stream_rpc_method_handler(
            servicer.HtlcInterceptor,
            request_deserializer=router__pb2.ForwardHtlcInterceptResponse.
            FromString,
            response_serializer=router__pb2.ForwardHtlcInterceptRequest.
            SerializeToString,
        ),
        'UpdateChanStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateChanStatus,
            request_deserializer=router__pb2.UpdateChanStatusRequest.
            FromString,
            response_serializer=router__pb2.UpdateChanStatusResponse.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'routerrpc.Router', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #40
0
def add_ProcessServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'map':
        grpc.unary_unary_rpc_method_handler(
            servicer.map,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'mapValues':
        grpc.unary_unary_rpc_method_handler(
            servicer.mapValues,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'join':
        grpc.unary_unary_rpc_method_handler(
            servicer.join,
            request_deserializer=processor__pb2.BinaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'reduce':
        grpc.unary_stream_rpc_method_handler(
            servicer.reduce,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=kv__pb2.Operand.SerializeToString,
        ),
        'mapPartitions':
        grpc.unary_unary_rpc_method_handler(
            servicer.mapPartitions,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'glom':
        grpc.unary_unary_rpc_method_handler(
            servicer.glom,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'sample':
        grpc.unary_unary_rpc_method_handler(
            servicer.sample,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'subtractByKey':
        grpc.unary_unary_rpc_method_handler(
            servicer.subtractByKey,
            request_deserializer=processor__pb2.BinaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'filter':
        grpc.unary_unary_rpc_method_handler(
            servicer.filter,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'union':
        grpc.unary_unary_rpc_method_handler(
            servicer.union,
            request_deserializer=processor__pb2.BinaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
        'flatMap':
        grpc.unary_unary_rpc_method_handler(
            servicer.flatMap,
            request_deserializer=processor__pb2.UnaryProcess.FromString,
            response_serializer=storage__basic__pb2.StorageLocator.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'com.webank.ai.eggroll.api.computing.processor.ProcessService',
        rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_MruVObjectsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateObject,
            request_deserializer=objects_dot_objects__pb2.CreateObjectRequest.
            FromString,
            response_serializer=objects_dot_objects__pb2.CreateObjectResponse.
            SerializeToString,
        ),
        'GetObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetObject,
            request_deserializer=objects_dot_objects__pb2.GetObjectRequest.
            FromString,
            response_serializer=objects_dot_objects__pb2.GetObjectResponse.
            SerializeToString,
        ),
        'UpdateObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateObject,
            request_deserializer=objects_dot_objects__pb2.UpdateObjectRequest.
            FromString,
            response_serializer=objects_dot_objects__pb2.UpdateObjectResponse.
            SerializeToString,
        ),
        'DeleteObject':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteObject,
            request_deserializer=objects_dot_objects__pb2.DeleteObjectRequest.
            FromString,
            response_serializer=objects_dot_objects__pb2.DeleteObjectResponse.
            SerializeToString,
        ),
        'AddObjectMaterial':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddObjectMaterial,
            request_deserializer=objects_dot_objects__pb2.
            AddObjectMaterialRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            AddObjectMaterialResponse.SerializeToString,
        ),
        'GetObjectMaterials':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetObjectMaterials,
            request_deserializer=objects_dot_objects__pb2.
            GetObjectMaterialsRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            GetObjectMaterialsResponse.SerializeToString,
        ),
        'DeleteObjectMaterial':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteObjectMaterial,
            request_deserializer=objects_dot_objects__pb2.
            DeleteObjectMaterialRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            DeleteObjectMaterialResponse.SerializeToString,
        ),
        'AddObjectMaterialText':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddObjectMaterialText,
            request_deserializer=objects_dot_objects__pb2.
            AddObjectMaterialTextRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            AddObjectMaterialTextResponse.SerializeToString,
        ),
        'GetObjectMaterialTexts':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetObjectMaterialTexts,
            request_deserializer=objects_dot_objects__pb2.
            GetObjectMaterialTextsRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            GetObjectMaterialTextsResponse.SerializeToString,
        ),
        'DeleteObjectMaterialText':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteObjectMaterialText,
            request_deserializer=objects_dot_objects__pb2.
            DeleteObjectMaterialTextRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            DeleteObjectMaterialTextResponse.SerializeToString,
        ),
        'AddRemoveBuilding':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddRemoveBuilding,
            request_deserializer=objects_dot_objects__pb2.
            AddRemoveBuildingRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            AddRemoveBuildingResponse.SerializeToString,
        ),
        'GetRemovedBuildings':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetRemovedBuildings,
            request_deserializer=objects_dot_objects__pb2.
            GetRemovedBuildingsRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            GetRemovedBuildingsResponse.SerializeToString,
        ),
        'DeleteRemoveBuilding':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteRemoveBuilding,
            request_deserializer=objects_dot_objects__pb2.
            DeleteRemoveBuildingRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            DeleteRemoveBuildingResponse.SerializeToString,
        ),
        'FetchAllObjects':
        grpc.unary_stream_rpc_method_handler(
            servicer.FetchAllObjects,
            request_deserializer=objects_dot_objects__pb2.
            FetchAllObjectsRequest.FromString,
            response_serializer=objects_dot_objects__pb2.
            FetchAllObjectsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'mruv.objects.MruVObjectsService', 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_SpannerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateSession': grpc.unary_unary_rpc_method_handler(
          servicer.CreateSession,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CreateSessionRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.Session.SerializeToString,
      ),
      'GetSession': grpc.unary_unary_rpc_method_handler(
          servicer.GetSession,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.GetSessionRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.Session.SerializeToString,
      ),
      'ListSessions': grpc.unary_unary_rpc_method_handler(
          servicer.ListSessions,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ListSessionsRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ListSessionsResponse.SerializeToString,
      ),
      'DeleteSession': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteSession,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.DeleteSessionRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'ExecuteSql': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteSql,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteSqlRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.ResultSet.SerializeToString,
      ),
      'ExecuteStreamingSql': grpc.unary_stream_rpc_method_handler(
          servicer.ExecuteStreamingSql,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteSqlRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.PartialResultSet.SerializeToString,
      ),
      'Read': grpc.unary_unary_rpc_method_handler(
          servicer.Read,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ReadRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.ResultSet.SerializeToString,
      ),
      'StreamingRead': grpc.unary_stream_rpc_method_handler(
          servicer.StreamingRead,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ReadRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.PartialResultSet.SerializeToString,
      ),
      'BeginTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.BeginTransaction,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.BeginTransactionRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_transaction__pb2.Transaction.SerializeToString,
      ),
      'Commit': grpc.unary_unary_rpc_method_handler(
          servicer.Commit,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CommitRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CommitResponse.SerializeToString,
      ),
      'Rollback': grpc.unary_unary_rpc_method_handler(
          servicer.Rollback,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.RollbackRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'PartitionQuery': grpc.unary_unary_rpc_method_handler(
          servicer.PartitionQuery,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionQueryRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionResponse.SerializeToString,
      ),
      'PartitionRead': grpc.unary_unary_rpc_method_handler(
          servicer.PartitionRead,
          request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionReadRequest.FromString,
          response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.spanner.v1.Spanner', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_SpannerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateSession": grpc.unary_unary_rpc_method_handler(
            servicer.CreateSession,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CreateSessionRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.Session.SerializeToString,
        ),
        "GetSession": grpc.unary_unary_rpc_method_handler(
            servicer.GetSession,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.GetSessionRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.Session.SerializeToString,
        ),
        "ListSessions": grpc.unary_unary_rpc_method_handler(
            servicer.ListSessions,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ListSessionsRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ListSessionsResponse.SerializeToString,
        ),
        "DeleteSession": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteSession,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.DeleteSessionRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "ExecuteSql": grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteSql,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteSqlRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.ResultSet.SerializeToString,
        ),
        "ExecuteStreamingSql": grpc.unary_stream_rpc_method_handler(
            servicer.ExecuteStreamingSql,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteSqlRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.PartialResultSet.SerializeToString,
        ),
        "ExecuteBatchDml": grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteBatchDml,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteBatchDmlRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ExecuteBatchDmlResponse.SerializeToString,
        ),
        "Read": grpc.unary_unary_rpc_method_handler(
            servicer.Read,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ReadRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.ResultSet.SerializeToString,
        ),
        "StreamingRead": grpc.unary_stream_rpc_method_handler(
            servicer.StreamingRead,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.ReadRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2.PartialResultSet.SerializeToString,
        ),
        "BeginTransaction": grpc.unary_unary_rpc_method_handler(
            servicer.BeginTransaction,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.BeginTransactionRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_transaction__pb2.Transaction.SerializeToString,
        ),
        "Commit": grpc.unary_unary_rpc_method_handler(
            servicer.Commit,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CommitRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.CommitResponse.SerializeToString,
        ),
        "Rollback": grpc.unary_unary_rpc_method_handler(
            servicer.Rollback,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.RollbackRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "PartitionQuery": grpc.unary_unary_rpc_method_handler(
            servicer.PartitionQuery,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionQueryRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionResponse.SerializeToString,
        ),
        "PartitionRead": grpc.unary_unary_rpc_method_handler(
            servicer.PartitionRead,
            request_deserializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionReadRequest.FromString,
            response_serializer=google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2.PartitionResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.spanner.v1.Spanner", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
def add_SnapshotsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Prepare':
        grpc.unary_unary_rpc_method_handler(
            servicer.Prepare,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            PrepareSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            PrepareSnapshotResponse.SerializeToString,
        ),
        'View':
        grpc.unary_unary_rpc_method_handler(
            servicer.View,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            ViewSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            ViewSnapshotResponse.SerializeToString,
        ),
        'Mounts':
        grpc.unary_unary_rpc_method_handler(
            servicer.Mounts,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            MountsRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            MountsResponse.SerializeToString,
        ),
        'Commit':
        grpc.unary_unary_rpc_method_handler(
            servicer.Commit,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            CommitSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_vendor_dot_google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'Remove':
        grpc.unary_unary_rpc_method_handler(
            servicer.Remove,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            RemoveSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_vendor_dot_google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'Stat':
        grpc.unary_unary_rpc_method_handler(
            servicer.Stat,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            StatSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            StatSnapshotResponse.SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            UpdateSnapshotRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            UpdateSnapshotResponse.SerializeToString,
        ),
        'List':
        grpc.unary_stream_rpc_method_handler(
            servicer.List,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            ListSnapshotsRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            ListSnapshotsResponse.SerializeToString,
        ),
        'Usage':
        grpc.unary_unary_rpc_method_handler(
            servicer.Usage,
            request_deserializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            UsageRequest.FromString,
            response_serializer=
            containerd_dot_services_dot_snapshots_dot_v1_dot_snapshots__pb2.
            UsageResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'containerd.services.snapshots.v1.Snapshots', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
Example #46
0
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,))
Example #47
0
def add_QueryServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Execute': grpc.unary_unary_rpc_method_handler(
          servicer.Execute,
          request_deserializer=query__pb2.ExecuteRequest.FromString,
          response_serializer=query__pb2.ExecuteResponse.SerializeToString,
      ),
      'ExecuteBatch': grpc.unary_unary_rpc_method_handler(
          servicer.ExecuteBatch,
          request_deserializer=query__pb2.ExecuteBatchRequest.FromString,
          response_serializer=query__pb2.ExecuteBatchResponse.SerializeToString,
      ),
      'StreamExecute': grpc.unary_stream_rpc_method_handler(
          servicer.StreamExecute,
          request_deserializer=query__pb2.StreamExecuteRequest.FromString,
          response_serializer=query__pb2.StreamExecuteResponse.SerializeToString,
      ),
      'Begin': grpc.unary_unary_rpc_method_handler(
          servicer.Begin,
          request_deserializer=query__pb2.BeginRequest.FromString,
          response_serializer=query__pb2.BeginResponse.SerializeToString,
      ),
      'Commit': grpc.unary_unary_rpc_method_handler(
          servicer.Commit,
          request_deserializer=query__pb2.CommitRequest.FromString,
          response_serializer=query__pb2.CommitResponse.SerializeToString,
      ),
      'Rollback': grpc.unary_unary_rpc_method_handler(
          servicer.Rollback,
          request_deserializer=query__pb2.RollbackRequest.FromString,
          response_serializer=query__pb2.RollbackResponse.SerializeToString,
      ),
      'Prepare': grpc.unary_unary_rpc_method_handler(
          servicer.Prepare,
          request_deserializer=query__pb2.PrepareRequest.FromString,
          response_serializer=query__pb2.PrepareResponse.SerializeToString,
      ),
      'CommitPrepared': grpc.unary_unary_rpc_method_handler(
          servicer.CommitPrepared,
          request_deserializer=query__pb2.CommitPreparedRequest.FromString,
          response_serializer=query__pb2.CommitPreparedResponse.SerializeToString,
      ),
      'RollbackPrepared': grpc.unary_unary_rpc_method_handler(
          servicer.RollbackPrepared,
          request_deserializer=query__pb2.RollbackPreparedRequest.FromString,
          response_serializer=query__pb2.RollbackPreparedResponse.SerializeToString,
      ),
      'CreateTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.CreateTransaction,
          request_deserializer=query__pb2.CreateTransactionRequest.FromString,
          response_serializer=query__pb2.CreateTransactionResponse.SerializeToString,
      ),
      'StartCommit': grpc.unary_unary_rpc_method_handler(
          servicer.StartCommit,
          request_deserializer=query__pb2.StartCommitRequest.FromString,
          response_serializer=query__pb2.StartCommitResponse.SerializeToString,
      ),
      'SetRollback': grpc.unary_unary_rpc_method_handler(
          servicer.SetRollback,
          request_deserializer=query__pb2.SetRollbackRequest.FromString,
          response_serializer=query__pb2.SetRollbackResponse.SerializeToString,
      ),
      'ConcludeTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.ConcludeTransaction,
          request_deserializer=query__pb2.ConcludeTransactionRequest.FromString,
          response_serializer=query__pb2.ConcludeTransactionResponse.SerializeToString,
      ),
      'ReadTransaction': grpc.unary_unary_rpc_method_handler(
          servicer.ReadTransaction,
          request_deserializer=query__pb2.ReadTransactionRequest.FromString,
          response_serializer=query__pb2.ReadTransactionResponse.SerializeToString,
      ),
      'BeginExecute': grpc.unary_unary_rpc_method_handler(
          servicer.BeginExecute,
          request_deserializer=query__pb2.BeginExecuteRequest.FromString,
          response_serializer=query__pb2.BeginExecuteResponse.SerializeToString,
      ),
      'BeginExecuteBatch': grpc.unary_unary_rpc_method_handler(
          servicer.BeginExecuteBatch,
          request_deserializer=query__pb2.BeginExecuteBatchRequest.FromString,
          response_serializer=query__pb2.BeginExecuteBatchResponse.SerializeToString,
      ),
      'SplitQuery': grpc.unary_unary_rpc_method_handler(
          servicer.SplitQuery,
          request_deserializer=query__pb2.SplitQueryRequest.FromString,
          response_serializer=query__pb2.SplitQueryResponse.SerializeToString,
      ),
      'StreamHealth': grpc.unary_stream_rpc_method_handler(
          servicer.StreamHealth,
          request_deserializer=query__pb2.StreamHealthRequest.FromString,
          response_serializer=query__pb2.StreamHealthResponse.SerializeToString,
      ),
      'UpdateStream': grpc.unary_stream_rpc_method_handler(
          servicer.UpdateStream,
          request_deserializer=query__pb2.UpdateStreamRequest.FromString,
          response_serializer=query__pb2.UpdateStreamResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'queryservice.Query', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_ClusterServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'Get':
        grpc.unary_unary_rpc_method_handler(
            servicer.Get,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .GetClusterRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__pb2.
            Cluster.SerializeToString,
        ),
        'List':
        grpc.unary_unary_rpc_method_handler(
            servicer.List,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClustersRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClustersResponse.SerializeToString,
        ),
        'Create':
        grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .CreateClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Update':
        grpc.unary_unary_rpc_method_handler(
            servicer.Update,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .UpdateClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Delete':
        grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .DeleteClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Start':
        grpc.unary_unary_rpc_method_handler(
            servicer.Start,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .StartClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Stop':
        grpc.unary_unary_rpc_method_handler(
            servicer.Stop,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .StopClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Move':
        grpc.unary_unary_rpc_method_handler(
            servicer.Move,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .MoveClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Backup':
        grpc.unary_unary_rpc_method_handler(
            servicer.Backup,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .BackupClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'Restore':
        grpc.unary_unary_rpc_method_handler(
            servicer.Restore,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .RestoreClusterRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'ListLogs':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListLogs,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterLogsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterLogsResponse.SerializeToString,
        ),
        'StreamLogs':
        grpc.unary_stream_rpc_method_handler(
            servicer.StreamLogs,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .StreamClusterLogsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .LogRecord.SerializeToString,
        ),
        'ListOperations':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListOperations,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterOperationsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterOperationsResponse.SerializeToString,
        ),
        'ListBackups':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListBackups,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterBackupsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterBackupsResponse.SerializeToString,
        ),
        'ListHosts':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListHosts,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterHostsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterHostsResponse.SerializeToString,
        ),
        'AddHosts':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddHosts,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .AddClusterHostsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'DeleteHosts':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteHosts,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .DeleteClusterHostsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'EnableSharding':
        grpc.unary_unary_rpc_method_handler(
            servicer.EnableSharding,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .EnableClusterShardingRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'GetShard':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetShard,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .GetClusterShardRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__pb2.Shard.
            SerializeToString,
        ),
        'ListShards':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListShards,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterShardsRequest.FromString,
            response_serializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ListClusterShardsResponse.SerializeToString,
        ),
        'AddShard':
        grpc.unary_unary_rpc_method_handler(
            servicer.AddShard,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .AddClusterShardRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'DeleteShard':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteShard,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .DeleteClusterShardRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'ResetupHosts':
        grpc.unary_unary_rpc_method_handler(
            servicer.ResetupHosts,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .ResetupHostsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
        'RestartHosts':
        grpc.unary_unary_rpc_method_handler(
            servicer.RestartHosts,
            request_deserializer=
            yandex_dot_cloud_dot_mdb_dot_mongodb_dot_v1_dot_cluster__service__pb2
            .RestartHostsRequest.FromString,
            response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2
            .Operation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'yandex.cloud.mdb.mongodb.v1.ClusterService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_OperationsServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetOperation':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetOperation,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            GetOperationRequest.FromString,
            response_serializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            Operation.SerializeToString,
        ),
        'WaitOperation':
        grpc.unary_unary_rpc_method_handler(
            servicer.WaitOperation,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            WaitOperationRequest.FromString,
            response_serializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            Operation.SerializeToString,
        ),
        'ListOperations':
        grpc.unary_unary_rpc_method_handler(
            servicer.ListOperations,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            ListOperationsRequest.FromString,
            response_serializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            ListOperationsResponse.SerializeToString,
        ),
        'WatchOperations':
        grpc.unary_stream_rpc_method_handler(
            servicer.WatchOperations,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            WatchOperationsRequest.FromString,
            response_serializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            WatchOperationsResponse.SerializeToString,
        ),
        'DeleteOperation':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteOperation,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            DeleteOperationRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
        'CancelOperation':
        grpc.unary_unary_rpc_method_handler(
            servicer.CancelOperation,
            request_deserializer=
            tinkoff_dot_cloud_dot_longrunning_dot_v1_dot_longrunning__pb2.
            CancelOperationRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.
            SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'tinkoff.cloud.longrunning.v1.Operations', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_MusicPlayerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'RetrieveAlbumList': grpc.unary_unary_rpc_method_handler(
          servicer.RetrieveAlbumList,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.AlbumList.SerializeToString,
      ),
      'RetrieveSongList': grpc.unary_unary_rpc_method_handler(
          servicer.RetrieveSongList,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.SongList.SerializeToString,
      ),
      'Play': grpc.unary_unary_rpc_method_handler(
          servicer.Play,
          request_deserializer=mmp__pb2.MediaControl.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'ChangeVolume': grpc.unary_unary_rpc_method_handler(
          servicer.ChangeVolume,
          request_deserializer=mmp__pb2.VolumeControl.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'ChangePosition': grpc.unary_unary_rpc_method_handler(
          servicer.ChangePosition,
          request_deserializer=mmp__pb2.PositionControl.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'Previous': grpc.unary_unary_rpc_method_handler(
          servicer.Previous,
          request_deserializer=mmp__pb2.PlaybackControl.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'Next': grpc.unary_unary_rpc_method_handler(
          servicer.Next,
          request_deserializer=mmp__pb2.PlaybackControl.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'AddNext': grpc.unary_unary_rpc_method_handler(
          servicer.AddNext,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'AddToQueue': grpc.unary_unary_rpc_method_handler(
          servicer.AddToQueue,
          request_deserializer=mmp__pb2.MediaData.FromString,
          response_serializer=mmp__pb2.MMPResponse.SerializeToString,
      ),
      'RetrieveMMPStatus': grpc.unary_unary_rpc_method_handler(
          servicer.RetrieveMMPStatus,
          request_deserializer=mmp__pb2.MMPStatusRequest.FromString,
          response_serializer=mmp__pb2.MMPStatus.SerializeToString,
      ),
      'RegisterMMPNotify': grpc.unary_stream_rpc_method_handler(
          servicer.RegisterMMPNotify,
          request_deserializer=mmp__pb2.MMPStatusRequest.FromString,
          response_serializer=mmp__pb2.MMPStatus.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grpc.MusicPlayer', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
def add_TextureStudioServerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'StartServer':
        grpc.unary_unary_rpc_method_handler(
            servicer.StartServer,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            StartServerRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            StartServerResponse.SerializeToString,
        ),
        'StopServer':
        grpc.unary_unary_rpc_method_handler(
            servicer.StopServer,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            StopServerRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            StopServerResponse.SerializeToString,
        ),
        'RestartServer':
        grpc.unary_unary_rpc_method_handler(
            servicer.RestartServer,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            RestartServerRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            RestartServerResponse.SerializeToString,
        ),
        'ServerStatus':
        grpc.unary_unary_rpc_method_handler(
            servicer.ServerStatus,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            ServerStatusRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            ServerStatusResponse.SerializeToString,
        ),
        'UploadProject':
        grpc.unary_unary_rpc_method_handler(
            servicer.UploadProject,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            UploadProjectRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            UploadProjectResponse.SerializeToString,
        ),
        'GetProject':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetProject,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            GetProjectRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            GetProjectResponse.SerializeToString,
        ),
        'GetProjects':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetProjects,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            GetProjectsRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            GetProjectsResponse.SerializeToString,
        ),
        'SubscribeToProjectsChanges':
        grpc.unary_stream_rpc_method_handler(
            servicer.SubscribeToProjectsChanges,
            request_deserializer=texturestudio_dot_texturestudio__server__pb2.
            SubscribeToProjectsChangesRequest.FromString,
            response_serializer=texturestudio_dot_texturestudio__server__pb2.
            SubscribeToProjectsChangesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'texture_studio.TextureStudioServerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))
def add_CaseServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetGridCount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGridCount,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.GridCount.SerializeToString,
            ),
            'GetCellCount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCellCount,
                    request_deserializer=Case__pb2.CellInfoRequest.FromString,
                    response_serializer=Case__pb2.CellCount.SerializeToString,
            ),
            'GetCellInfoForActiveCells': grpc.unary_stream_rpc_method_handler(
                    servicer.GetCellInfoForActiveCells,
                    request_deserializer=Case__pb2.CellInfoRequest.FromString,
                    response_serializer=Case__pb2.CellInfoArray.SerializeToString,
            ),
            'GetCellCenterForActiveCells': grpc.unary_stream_rpc_method_handler(
                    servicer.GetCellCenterForActiveCells,
                    request_deserializer=Case__pb2.CellInfoRequest.FromString,
                    response_serializer=Definitions__pb2.CellCenters.SerializeToString,
            ),
            'GetCellCornersForActiveCells': grpc.unary_stream_rpc_method_handler(
                    servicer.GetCellCornersForActiveCells,
                    request_deserializer=Case__pb2.CellInfoRequest.FromString,
                    response_serializer=Definitions__pb2.CellCornersArray.SerializeToString,
            ),
            'GetCoarseningInfoArray': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCoarseningInfoArray,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.CoarseningInfoArray.SerializeToString,
            ),
            'GetTimeSteps': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTimeSteps,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.TimeStepDates.SerializeToString,
            ),
            'GetSelectedCells': grpc.unary_stream_rpc_method_handler(
                    servicer.GetSelectedCells,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.SelectedCells.SerializeToString,
            ),
            'GetDaysSinceStart': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDaysSinceStart,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.DaysSinceStart.SerializeToString,
            ),
            'GetCaseInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCaseInfo,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.CaseInfo.SerializeToString,
            ),
            'GetPdmObject': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPdmObject,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=PdmObject__pb2.PdmObject.SerializeToString,
            ),
            'GetReservoirBoundingBox': grpc.unary_unary_rpc_method_handler(
                    servicer.GetReservoirBoundingBox,
                    request_deserializer=Case__pb2.CaseRequest.FromString,
                    response_serializer=Case__pb2.BoundingBox.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'rips.Case', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Example #53
0
def add_DatabaseServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get_stocks': grpc.unary_stream_rpc_method_handler(
                    servicer.get_stocks,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.Stock.SerializeToString,
            ),
            'get_stock': grpc.unary_unary_rpc_method_handler(
                    servicer.get_stock,
                    request_deserializer=api_dot_protos_dot_database__pb2.Symbol.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.Stock.SerializeToString,
            ),
            'upsert_stocks': grpc.stream_unary_rpc_method_handler(
                    servicer.upsert_stocks,
                    request_deserializer=api_dot_protos_dot_database__pb2.Stock.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_ptt_trend': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_ptt_trend,
                    request_deserializer=api_dot_protos_dot_database__pb2.TrendWithDefaultDate.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_reunion_trend': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_reunion_trend,
                    request_deserializer=api_dot_protos_dot_database__pb2.TrendWithDefaultDate.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_twse_over_bought': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_twse_over_bought,
                    request_deserializer=api_dot_protos_dot_database__pb2.BoughtOrSold.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_twse_over_sold': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_twse_over_sold,
                    request_deserializer=api_dot_protos_dot_database__pb2.BoughtOrSold.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_fugle_over_bought': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_fugle_over_bought,
                    request_deserializer=api_dot_protos_dot_database__pb2.BoughtOrSold.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_fugle_over_sold': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_fugle_over_sold,
                    request_deserializer=api_dot_protos_dot_database__pb2.BoughtOrSold.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_twse_open_price': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_twse_open_price,
                    request_deserializer=api_dot_protos_dot_database__pb2.StockPrice.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_twse_close_price': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_twse_close_price,
                    request_deserializer=api_dot_protos_dot_database__pb2.StockPrice.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
            'insert_us_close_price': grpc.unary_unary_rpc_method_handler(
                    servicer.insert_us_close_price,
                    request_deserializer=api_dot_protos_dot_database__pb2.StockPrice.FromString,
                    response_serializer=api_dot_protos_dot_database__pb2.RowCount.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Database', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
def add_MruVBusinessServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CreateBusiness':
        grpc.unary_unary_rpc_method_handler(
            servicer.CreateBusiness,
            request_deserializer=business_dot_business__pb2.
            CreateBusinessRequest.FromString,
            response_serializer=business_dot_business__pb2.
            CreateBusinessResponse.SerializeToString,
        ),
        'GetBusiness':
        grpc.unary_unary_rpc_method_handler(
            servicer.GetBusiness,
            request_deserializer=business_dot_business__pb2.GetBusinessRequest.
            FromString,
            response_serializer=business_dot_business__pb2.Business.
            SerializeToString,
        ),
        'UpdateBusiness':
        grpc.unary_unary_rpc_method_handler(
            servicer.UpdateBusiness,
            request_deserializer=business_dot_business__pb2.
            UpdateBusinessRequest.FromString,
            response_serializer=business_dot_business__pb2.Business.
            SerializeToString,
        ),
        'DeleteBusiness':
        grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBusiness,
            request_deserializer=business_dot_business__pb2.
            DeleteBusinessRequest.FromString,
            response_serializer=business_dot_business__pb2.
            DeleteBusinessResponse.SerializeToString,
        ),
        'AssignOwner':
        grpc.unary_unary_rpc_method_handler(
            servicer.AssignOwner,
            request_deserializer=business_dot_business__pb2.AssignOwnerRequest.
            FromString,
            response_serializer=business_dot_business__pb2.AssignOwnerResponse.
            SerializeToString,
        ),
        'AssignEstate':
        grpc.unary_unary_rpc_method_handler(
            servicer.AssignEstate,
            request_deserializer=business_dot_business__pb2.
            AssignEstateRequest.FromString,
            response_serializer=business_dot_business__pb2.
            AssignEstateResponse.SerializeToString,
        ),
        'UnassignEstate':
        grpc.unary_unary_rpc_method_handler(
            servicer.UnassignEstate,
            request_deserializer=business_dot_business__pb2.
            UnassignEstateRequest.FromString,
            response_serializer=business_dot_business__pb2.
            UnassignEstateResponse.SerializeToString,
        ),
        'BuyBusiness':
        grpc.unary_unary_rpc_method_handler(
            servicer.BuyBusiness,
            request_deserializer=business_dot_business__pb2.BuyBusinessRequest.
            FromString,
            response_serializer=business_dot_business__pb2.BuyBusinessResponse.
            SerializeToString,
        ),
        'WatchBusiness':
        grpc.unary_stream_rpc_method_handler(
            servicer.WatchBusiness,
            request_deserializer=business_dot_business__pb2.
            WatchBusinessRequest.FromString,
            response_serializer=business_dot_business__pb2.
            WatchBusinessResponse.SerializeToString,
        ),
        'WatchBusinesses':
        grpc.unary_stream_rpc_method_handler(
            servicer.WatchBusinesses,
            request_deserializer=business_dot_business__pb2.
            WatchBusinessesRequest.FromString,
            response_serializer=business_dot_business__pb2.
            WatchBusinessesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'mruv.business.MruVBusinessService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))