예제 #1
0
def early_adopter_create_PerfDbTransfer_server(servicer, port, private_key=None, certificate_chain=None):
  import perf_db_pb2
  import perf_db_pb2
  import perf_db_pb2
  import perf_db_pb2
  import perf_db_pb2
  import perf_db_pb2
  method_service_descriptions = {
    "RecordSingleClientData": utilities.unary_unary_service_description(
      servicer.RecordSingleClientData,
      perf_db_pb2.SingleUserRecordRequest.FromString,
      perf_db_pb2.SingleUserRecordReply.SerializeToString,
    ),
    "RetrieveAllUsersData": utilities.unary_unary_service_description(
      servicer.RetrieveAllUsersData,
      perf_db_pb2.AllUsersRetrieveRequest.FromString,
      perf_db_pb2.AllUsersRetrieveReply.SerializeToString,
    ),
    "RetrieveSingleUserData": utilities.unary_unary_service_description(
      servicer.RetrieveSingleUserData,
      perf_db_pb2.SingleUserRetrieveRequest.FromString,
      perf_db_pb2.SingleUserRetrieveReply.SerializeToString,
    ),
  }
  return implementations.server("grpc.testing.PerfDbTransfer", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #2
0
def early_adopter_create_BigtableService_server(servicer,
                                                port,
                                                private_key=None,
                                                certificate_chain=None):
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.empty_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_data_pb2
    method_service_descriptions = {
        "CheckAndMutateRow":
        alpha_utilities.unary_unary_service_description(
            servicer.CheckAndMutateRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            CheckAndMutateRowRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            CheckAndMutateRowResponse.SerializeToString,
        ),
        "MutateRow":
        alpha_utilities.unary_unary_service_description(
            servicer.MutateRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            MutateRowRequest.FromString,
            gcloud.bigtable._generated.empty_pb2.Empty.SerializeToString,
        ),
        "ReadModifyWriteRow":
        alpha_utilities.unary_unary_service_description(
            servicer.ReadModifyWriteRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            ReadModifyWriteRowRequest.FromString,
            gcloud.bigtable._generated.bigtable_data_pb2.Row.SerializeToString,
        ),
        "ReadRows":
        alpha_utilities.unary_stream_service_description(
            servicer.ReadRows,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            ReadRowsRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            ReadRowsResponse.SerializeToString,
        ),
        "SampleRowKeys":
        alpha_utilities.unary_stream_service_description(
            servicer.SampleRowKeys,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            SampleRowKeysRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.
            SampleRowKeysResponse.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "google.bigtable.v1.BigtableService",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #3
0
def early_adopter_create_RpcConnect_server(servicer, port, private_key=None, certificate_chain=None):
  import connect_pb2
  import connect_pb2
  import connect_pb2
  import connect_pb2
  import connect_pb2
  import connect_pb2
  method_service_descriptions = {
    "GetAppConfig": alpha_utilities.unary_unary_service_description(
      servicer.GetAppConfig,
      connect_pb2.GetAppConfigReq.FromString,
      connect_pb2.GetAppConfigRsp.SerializeToString,
    ),
    "NewEncryptedConnect": alpha_utilities.unary_unary_service_description(
      servicer.NewEncryptedConnect,
      connect_pb2.NewEncryptedConnectReq.FromString,
      connect_pb2.NewEncryptedConnectRsp.SerializeToString,
    ),
    "SendAppLog": alpha_utilities.unary_unary_service_description(
      servicer.SendAppLog,
      connect_pb2.SendAppLogReq.FromString,
      connect_pb2.SendAppLogRsp.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("Proto.RpcConnect", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #4
0
def early_adopter_create_Candidate_server(servicer,
                                          port,
                                          private_key=None,
                                          certificate_chain=None):
    import debate_pb2
    import debate_pb2
    import debate_pb2
    import debate_pb2
    method_service_descriptions = {
        "Answer":
        alpha_utilities.unary_unary_service_description(
            servicer.Answer,
            debate_pb2.AnswerRequest.FromString,
            debate_pb2.AnswerReply.SerializeToString,
        ),
        "Elaborate":
        alpha_utilities.unary_unary_service_description(
            servicer.Elaborate,
            debate_pb2.ElaborateRequest.FromString,
            debate_pb2.ElaborateReply.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "debate.Candidate",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #5
0
def early_adopter_create_RpcCount_server(servicer,
                                         port,
                                         private_key=None,
                                         certificate_chain=None):
    import count_pb2
    import count_pb2
    import count_pb2
    import count_pb2
    method_service_descriptions = {
        "GetCount":
        alpha_utilities.unary_unary_service_description(
            servicer.GetCount,
            count_pb2.GetCountReq.FromString,
            count_pb2.GetCountRsp.SerializeToString,
        ),
        "SetCount":
        alpha_utilities.unary_unary_service_description(
            servicer.SetCount,
            count_pb2.SetCountReq.FromString,
            count_pb2.SetCountRsp.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "Proto.RpcCount",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #6
0
def early_adopter_create_MysqlCtl_server(servicer, port, private_key=None, certificate_chain=None):
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  method_service_descriptions = {
    "RunMysqlUpgrade": utilities.unary_unary_service_description(
      servicer.RunMysqlUpgrade,
      mysqlctl_pb2.RunMysqlUpgradeRequest.FromString,
      mysqlctl_pb2.RunMysqlUpgradeResponse.SerializeToString,
    ),
    "Shutdown": utilities.unary_unary_service_description(
      servicer.Shutdown,
      mysqlctl_pb2.ShutdownRequest.FromString,
      mysqlctl_pb2.ShutdownResponse.SerializeToString,
    ),
    "Start": utilities.unary_unary_service_description(
      servicer.Start,
      mysqlctl_pb2.StartRequest.FromString,
      mysqlctl_pb2.StartResponse.SerializeToString,
    ),
  }
  return implementations.server("mysqlctl.MysqlCtl", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #7
0
파일: service_pb2.py 프로젝트: kunal10/Vurb
def early_adopter_create_DataRetrieval_server(servicer, port, private_key=None, certificate_chain=None):
  import service_pb2
  import service_pb2
  import service_pb2
  import service_pb2
  import service_pb2
  import service_pb2
  method_service_descriptions = {
    "GetDeck": alpha_utilities.unary_unary_service_description(
      servicer.GetDeck,
      service_pb2.DeckRequest.FromString,
      service_pb2.DeckResponse.SerializeToString,
    ),
    "GetDetailedUserDeck": alpha_utilities.unary_unary_service_description(
      servicer.GetDetailedUserDeck,
      service_pb2.UserDeckRequest.FromString,
      service_pb2.UserDeckResponse.SerializeToString,
    ),
    "GetUserDeck": alpha_utilities.unary_unary_service_description(
      servicer.GetUserDeck,
      service_pb2.UserDeckRequest.FromString,
      service_pb2.UserDeckResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("exercise.DataRetrieval", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #8
0
def early_adopter_create_MysqlCtl_server(servicer, port, root_certificates,
                                         key_chain_pairs):
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    method_service_descriptions = {
        "RunMysqlUpgrade":
        utilities.unary_unary_service_description(
            servicer.RunMysqlUpgrade,
            mysqlctl_pb2.RunMysqlUpgradeRequest.FromString,
            mysqlctl_pb2.RunMysqlUpgradeResponse.SerializeToString,
        ),
        "Shutdown":
        utilities.unary_unary_service_description(
            servicer.Shutdown,
            mysqlctl_pb2.ShutdownRequest.FromString,
            mysqlctl_pb2.ShutdownResponse.SerializeToString,
        ),
        "Start":
        utilities.unary_unary_service_description(
            servicer.Start,
            mysqlctl_pb2.StartRequest.FromString,
            mysqlctl_pb2.StartResponse.SerializeToString,
        ),
    }
    return implementations.secure_server("mysqlctl.MysqlCtl",
                                         method_service_descriptions, port,
                                         root_certificates, key_chain_pairs)
def early_adopter_create_RPCSeqAllocDispatcher_server(servicer,
                                                      port,
                                                      private_key=None,
                                                      certificate_chain=None):
    import seq_alloc_dispatcher_pb2
    import seq_alloc_dispatcher_pb2
    import seq_alloc_dispatcher_pb2
    import seq_alloc_dispatcher_pb2
    method_service_descriptions = {
        "DispatchCurSeqAlloc":
        alpha_utilities.unary_unary_service_description(
            servicer.DispatchCurSeqAlloc,
            seq_alloc_dispatcher_pb2.DispatchCurSeqAllocReq.FromString,
            seq_alloc_dispatcher_pb2.DispatchCurSeqAllocRsp.SerializeToString,
        ),
        "DispatchNewSeqAlloc":
        alpha_utilities.unary_unary_service_description(
            servicer.DispatchNewSeqAlloc,
            seq_alloc_dispatcher_pb2.DispatchNewSeqAllocReq.FromString,
            seq_alloc_dispatcher_pb2.DispatchNewSeqAllocRsp.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "Proto.RPCSeqAllocDispatcher",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #10
0
def early_adopter_create_Automation_server(servicer, port, private_key=None, certificate_chain=None):
    import automation_pb2
    import automation_pb2
    import automation_pb2
    import automation_pb2

    method_service_descriptions = {
        "EnqueueClusterOperation": utilities.unary_unary_service_description(
            servicer.EnqueueClusterOperation,
            automation_pb2.EnqueueClusterOperationRequest.FromString,
            automation_pb2.EnqueueClusterOperationResponse.SerializeToString,
        ),
        "GetClusterOperationDetails": utilities.unary_unary_service_description(
            servicer.GetClusterOperationDetails,
            automation_pb2.GetClusterOperationDetailsRequest.FromString,
            automation_pb2.GetClusterOperationDetailsResponse.SerializeToString,
        ),
    }
    return implementations.server(
        "automationservice.Automation",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain,
    )
예제 #11
0
def early_adopter_create_Authentication_server(servicer,
                                               port,
                                               private_key=None,
                                               certificate_chain=None):
    import auth_user_pb2
    import auth_user_pb2
    import auth_user_pb2
    import auth_user_pb2
    method_service_descriptions = {
        "AuthenticateUser":
        utilities.unary_unary_service_description(
            servicer.AuthenticateUser,
            auth_user_pb2.AuthenticateUserRequest.FromString,
            auth_user_pb2.AuthenticateUserReply.SerializeToString,
        ),
        "ConfirmUser":
        utilities.unary_unary_service_description(
            servicer.ConfirmUser,
            auth_user_pb2.ConfirmUserRequest.FromString,
            auth_user_pb2.ConfirmUserReply.SerializeToString,
        ),
    }
    return implementations.server("grpc.testing.Authentication",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #12
0
def early_adopter_create_NameNode_server(servicer, port, private_key=None, certificate_chain=None):
  import namenode_pb2
  import namenode_pb2
  import namenode_pb2
  import namenode_pb2
  import namenode_pb2
  import namenode_pb2
  method_service_descriptions = {
    "Read": alpha_utilities.unary_unary_service_description(
      servicer.Read,
      namenode_pb2.ReadRequest.FromString,
      namenode_pb2.ReadReply.SerializeToString,
    ),
    "Store": alpha_utilities.unary_unary_service_description(
      servicer.Store,
      namenode_pb2.StoreRequest.FromString,
      namenode_pb2.StoreReply.SerializeToString,
    ),
    "isAlive": alpha_utilities.unary_unary_service_description(
      servicer.isAlive,
      namenode_pb2.AliveRequest.FromString,
      namenode_pb2.AliveReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("NameNode", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_Operations_server(servicer, port, private_key=None, certificate_chain=None):
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.protobuf.empty_pb2
  import google.longrunning.operations_pb2
  import google.protobuf.empty_pb2
  method_service_descriptions = {
    "CancelOperation": alpha_utilities.unary_unary_service_description(
      servicer.CancelOperation,
      google.longrunning.operations_pb2.CancelOperationRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "DeleteOperation": alpha_utilities.unary_unary_service_description(
      servicer.DeleteOperation,
      google.longrunning.operations_pb2.DeleteOperationRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "GetOperation": alpha_utilities.unary_unary_service_description(
      servicer.GetOperation,
      google.longrunning.operations_pb2.GetOperationRequest.FromString,
      google.longrunning.operations_pb2.Operation.SerializeToString,
    ),
    "ListOperations": alpha_utilities.unary_unary_service_description(
      servicer.ListOperations,
      google.longrunning.operations_pb2.ListOperationsRequest.FromString,
      google.longrunning.operations_pb2.ListOperationsResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("google.longrunning.Operations", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #14
0
def early_adopter_create_Automation_server(servicer,
                                           port,
                                           private_key=None,
                                           certificate_chain=None):
    import automation_pb2
    import automation_pb2
    import automation_pb2
    import automation_pb2
    method_service_descriptions = {
        "EnqueueClusterOperation":
        utilities.unary_unary_service_description(
            servicer.EnqueueClusterOperation,
            automation_pb2.EnqueueClusterOperationRequest.FromString,
            automation_pb2.EnqueueClusterOperationResponse.SerializeToString,
        ),
        "GetClusterOperationDetails":
        utilities.unary_unary_service_description(
            servicer.GetClusterOperationDetails,
            automation_pb2.GetClusterOperationDetailsRequest.FromString,
            automation_pb2.GetClusterOperationDetailsResponse.
            SerializeToString,
        ),
    }
    return implementations.server("automationservice.Automation",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #15
0
def early_adopter_create_Deployments_server(servicer, port, private_key=None, certificate_chain=None):
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  import deployments_pb2
  method_service_descriptions = {
    "GetFlagz": utilities.unary_unary_service_description(
      servicer.GetFlagz,
      deployments_pb2.FlagzId.FromString,
      deployments_pb2.Flagz.SerializeToString,
    ),
    "ListFlagz": utilities.unary_stream_service_description(
      servicer.ListFlagz,
      deployments_pb2.DeploymentId.FromString,
      deployments_pb2.Flagz.SerializeToString,
    ),
    "SetFlagzValue": utilities.unary_unary_service_description(
      servicer.SetFlagzValue,
      deployments_pb2.Flagz.FromString,
      deployments_pb2.Empty.SerializeToString,
    ),
  }
  return implementations.server("improbable.v2.deployments.Deployments", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #16
0
def early_adopter_create_PerfDbTransfer_server(servicer,
                                               port,
                                               private_key=None,
                                               certificate_chain=None):
    import perf_db_pb2
    import perf_db_pb2
    import perf_db_pb2
    import perf_db_pb2
    import perf_db_pb2
    import perf_db_pb2
    method_service_descriptions = {
        "RecordSingleClientData":
        utilities.unary_unary_service_description(
            servicer.RecordSingleClientData,
            perf_db_pb2.SingleUserRecordRequest.FromString,
            perf_db_pb2.SingleUserRecordReply.SerializeToString,
        ),
        "RetrieveAllUsersData":
        utilities.unary_unary_service_description(
            servicer.RetrieveAllUsersData,
            perf_db_pb2.AllUsersRetrieveRequest.FromString,
            perf_db_pb2.AllUsersRetrieveReply.SerializeToString,
        ),
        "RetrieveSingleUserData":
        utilities.unary_unary_service_description(
            servicer.RetrieveSingleUserData,
            perf_db_pb2.SingleUserRetrieveRequest.FromString,
            perf_db_pb2.SingleUserRetrieveReply.SerializeToString,
        ),
    }
    return implementations.server("grpc.testing.PerfDbTransfer",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #17
0
def early_adopter_create_QrLink_server(servicer,
                                       port,
                                       private_key=None,
                                       certificate_chain=None):
    import qrlink_pb2
    import qrlink_pb2
    import qrlink_pb2
    import qrlink_pb2
    method_service_descriptions = {
        "GetTempQrLink":
        utilities.unary_unary_service_description(
            servicer.GetTempQrLink,
            qrlink_pb2.QrLinkRequest.FromString,
            qrlink_pb2.QrLinkReply.SerializeToString,
        ),
        "GetlimitQrLink":
        utilities.unary_unary_service_description(
            servicer.GetlimitQrLink,
            qrlink_pb2.QrLinkRequest.FromString,
            qrlink_pb2.QrLinkReply.SerializeToString,
        ),
    }
    return implementations.server("QrLink",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #18
0
def early_adopter_create_ContentCmdHandler_server(servicer, port, private_key=None, certificate_chain=None):
  import content_pb2
  import content_pb2
  import base_pb2
  import content_pb2
  import base_pb2
  import content_pb2
  import content_pb2
  import content_pb2
  method_service_descriptions = {
    "remove": utilities.unary_unary_service_description(
      servicer.remove,
      base_pb2.Uuid.FromString,
      content_pb2.CmdResponse.SerializeToString,
    ),
    "removePart": utilities.unary_unary_service_description(
      servicer.removePart,
      base_pb2.Uuid.FromString,
      content_pb2.CmdResponse.SerializeToString,
    ),
    "save": utilities.unary_unary_service_description(
      servicer.save,
      content_pb2.Content.FromString,
      content_pb2.CmdResponse.SerializeToString,
    ),
    "updatePart": utilities.unary_unary_service_description(
      servicer.updatePart,
      content_pb2.UpdatePart.FromString,
      content_pb2.CmdResponse.SerializeToString,
    ),
  }
  return implementations.server("content.ContentCmdHandler", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_BigtableTableService_server(servicer, port, private_key=None, certificate_chain=None):
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_table_data_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_table_data_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import google.protobuf.empty_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import google.protobuf.empty_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_table_data_pb2
  import gcloud.bigtable._generated.bigtable_table_data_pb2
  import gcloud.bigtable._generated.bigtable_table_data_pb2
  import gcloud.bigtable._generated.bigtable_table_service_messages_pb2
  import google.protobuf.empty_pb2
  method_service_descriptions = {
    "CreateColumnFamily": alpha_utilities.unary_unary_service_description(
      servicer.CreateColumnFamily,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.CreateColumnFamilyRequest.FromString,
      gcloud.bigtable._generated.bigtable_table_data_pb2.ColumnFamily.SerializeToString,
    ),
    "CreateTable": alpha_utilities.unary_unary_service_description(
      servicer.CreateTable,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.CreateTableRequest.FromString,
      gcloud.bigtable._generated.bigtable_table_data_pb2.Table.SerializeToString,
    ),
    "DeleteColumnFamily": alpha_utilities.unary_unary_service_description(
      servicer.DeleteColumnFamily,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.DeleteColumnFamilyRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "DeleteTable": alpha_utilities.unary_unary_service_description(
      servicer.DeleteTable,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.DeleteTableRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "GetTable": alpha_utilities.unary_unary_service_description(
      servicer.GetTable,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.GetTableRequest.FromString,
      gcloud.bigtable._generated.bigtable_table_data_pb2.Table.SerializeToString,
    ),
    "ListTables": alpha_utilities.unary_unary_service_description(
      servicer.ListTables,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.ListTablesRequest.FromString,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.ListTablesResponse.SerializeToString,
    ),
    "RenameTable": alpha_utilities.unary_unary_service_description(
      servicer.RenameTable,
      gcloud.bigtable._generated.bigtable_table_service_messages_pb2.RenameTableRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "UpdateColumnFamily": alpha_utilities.unary_unary_service_description(
      servicer.UpdateColumnFamily,
      gcloud.bigtable._generated.bigtable_table_data_pb2.ColumnFamily.FromString,
      gcloud.bigtable._generated.bigtable_table_data_pb2.ColumnFamily.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("google.bigtable.admin.table.v1.BigtableTableService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #20
0
def early_adopter_create_JobsService_server(servicer,
                                            port,
                                            private_key=None,
                                            certificate_chain=None):
    import jobs_pb2
    method_service_descriptions = {
        "GetCount":
        alpha_utilities.unary_unary_service_description(
            servicer.GetCount,
            jobs_pb2.Void.FromString,
            jobs_pb2.Int.SerializeToString,
        ),
        "GetJobs":
        alpha_utilities.unary_stream_service_description(
            servicer.GetJobs,
            jobs_pb2.SearchOptions.FromString,
            jobs_pb2.JobInfo.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "jobs.JobsService",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #21
0
def early_adopter_create_RouteGuide_server(servicer, port, private_key=None, certificate_chain=None):
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  method_service_descriptions = {
    "GetFeature": alpha_utilities.unary_unary_service_description(
      servicer.GetFeature,
      route_guide_pb2.Point.FromString,
      route_guide_pb2.Feature.SerializeToString,
    ),
    "ListFeatures": alpha_utilities.unary_stream_service_description(
      servicer.ListFeatures,
      route_guide_pb2.Rectangle.FromString,
      route_guide_pb2.Feature.SerializeToString,
    ),
    "RecordRoute": alpha_utilities.stream_unary_service_description(
      servicer.RecordRoute,
      route_guide_pb2.Point.FromString,
      route_guide_pb2.RouteSummary.SerializeToString,
    ),
    "RouteChat": alpha_utilities.stream_stream_service_description(
      servicer.RouteChat,
      route_guide_pb2.RouteNote.FromString,
      route_guide_pb2.RouteNote.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("routeguide.RouteGuide", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #22
0
def early_adopter_create_BigtableService_server(servicer, port, private_key=None, certificate_chain=None):
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.empty_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_service_messages_pb2
    import gcloud.bigtable._generated.bigtable_data_pb2

    method_service_descriptions = {
        "CheckAndMutateRow": utilities.unary_unary_service_description(
            servicer.CheckAndMutateRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowResponse.SerializeToString,
        ),
        "MutateRow": utilities.unary_unary_service_description(
            servicer.MutateRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.MutateRowRequest.FromString,
            gcloud.bigtable._generated.empty_pb2.Empty.SerializeToString,
        ),
        "ReadModifyWriteRow": utilities.unary_unary_service_description(
            servicer.ReadModifyWriteRow,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadModifyWriteRowRequest.FromString,
            gcloud.bigtable._generated.bigtable_data_pb2.Row.SerializeToString,
        ),
        "ReadRows": utilities.unary_stream_service_description(
            servicer.ReadRows,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsResponse.SerializeToString,
        ),
        "SampleRowKeys": utilities.unary_stream_service_description(
            servicer.SampleRowKeys,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysRequest.FromString,
            gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysResponse.SerializeToString,
        ),
    }
    return implementations.server(
        "google.bigtable.v1.BigtableService",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain,
    )
예제 #23
0
파일: test_pb2.py 프로젝트: AddictXQ/grpc
def early_adopter_create_TestService_server(servicer, port, private_key=None, certificate_chain=None):
  import test.cpp.interop.empty_pb2
  import test.cpp.interop.empty_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  import test.cpp.interop.messages_pb2
  method_service_descriptions = {
    "EmptyCall": utilities.unary_unary_service_description(
      servicer.EmptyCall,
      test.cpp.interop.empty_pb2.Empty.FromString,
      test.cpp.interop.empty_pb2.Empty.SerializeToString,
    ),
    "FullDuplexCall": utilities.stream_stream_service_description(
      servicer.FullDuplexCall,
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
    ),
    "HalfDuplexCall": utilities.stream_stream_service_description(
      servicer.HalfDuplexCall,
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
    ),
    "StreamingInputCall": utilities.stream_unary_service_description(
      servicer.StreamingInputCall,
      test.cpp.interop.messages_pb2.StreamingInputCallRequest.FromString,
      test.cpp.interop.messages_pb2.StreamingInputCallResponse.SerializeToString,
    ),
    "StreamingOutputCall": utilities.unary_stream_service_description(
      servicer.StreamingOutputCall,
      test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
      test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
    ),
    "UnaryCall": utilities.unary_unary_service_description(
      servicer.UnaryCall,
      test.cpp.interop.messages_pb2.SimpleRequest.FromString,
      test.cpp.interop.messages_pb2.SimpleResponse.SerializeToString,
    ),
  }
  return implementations.server("grpc.testing.TestService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #24
0
def early_adopter_create_Manager_server(servicer, port, private_key=None, certificate_chain=None):
  import manager_django_pb2
  import manager_django_pb2
  import manager_django_pb2
  import manager_django_pb2
  method_service_descriptions = {
    "OpenFile": alpha_utilities.unary_unary_service_description(
      servicer.OpenFile,
      manager_django_pb2.OpenRequest.FromString,
      manager_django_pb2.OpenResponse.SerializeToString,
    ),
    "SaveFile": alpha_utilities.unary_unary_service_description(
      servicer.SaveFile,
      manager_django_pb2.SaveRequest.FromString,
      manager_django_pb2.SaveResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("consultation.Manager", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #25
0
def early_adopter_create_Authentication_server(servicer, port, private_key=None, certificate_chain=None):
  import auth_user_pb2
  import auth_user_pb2
  import auth_user_pb2
  import auth_user_pb2
  method_service_descriptions = {
    "AuthenticateUser": utilities.unary_unary_service_description(
      servicer.AuthenticateUser,
      auth_user_pb2.AuthenticateUserRequest.FromString,
      auth_user_pb2.AuthenticateUserReply.SerializeToString,
    ),
    "ConfirmUser": utilities.unary_unary_service_description(
      servicer.ConfirmUser,
      auth_user_pb2.ConfirmUserRequest.FromString,
      auth_user_pb2.ConfirmUserReply.SerializeToString,
    ),
  }
  return implementations.server("grpc.testing.Authentication", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #26
0
def early_adopter_create_Candidate_server(servicer, port, private_key=None, certificate_chain=None):
  import debate_pb2
  import debate_pb2
  import debate_pb2
  import debate_pb2
  method_service_descriptions = {
    "Answer": alpha_utilities.unary_unary_service_description(
      servicer.Answer,
      debate_pb2.AnswerRequest.FromString,
      debate_pb2.AnswerReply.SerializeToString,
    ),
    "Elaborate": alpha_utilities.unary_unary_service_description(
      servicer.Elaborate,
      debate_pb2.ElaborateRequest.FromString,
      debate_pb2.ElaborateReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("debate.Candidate", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #27
0
def early_adopter_create_EncoderDecoder_server(servicer, port, private_key=None, certificate_chain=None):
  import playcloud_pb2
  import playcloud_pb2
  import playcloud_pb2
  import playcloud_pb2
  method_service_descriptions = {
    "Decode": alpha_utilities.unary_unary_service_description(
      servicer.Decode,
      playcloud_pb2.DecodeRequest.FromString,
      playcloud_pb2.DecodeReply.SerializeToString,
    ),
    "Encode": alpha_utilities.unary_unary_service_description(
      servicer.Encode,
      playcloud_pb2.EncodeRequest.FromString,
      playcloud_pb2.EncodeReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("EncoderDecoder", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #28
0
def early_adopter_create_Search_server(servicer, port, private_key=None, certificate_chain=None):
  import search_pb2
  import search_pb2
  import search_pb2
  import search_pb2
  method_service_descriptions = {
    "Index": alpha_utilities.unary_unary_service_description(
      servicer.Index,
      search_pb2.IndexRequest.FromString,
      search_pb2.IndexReply.SerializeToString,
    ),
    "Search": alpha_utilities.unary_unary_service_description(
      servicer.Search,
      search_pb2.SearchRequest.FromString,
      search_pb2.SearchReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("search.Search", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #29
0
def early_adopter_create_RpcCoupon_server(servicer,
                                          port,
                                          private_key=None,
                                          certificate_chain=None):
    import statement_pb2
    import statement_pb2
    import statement_pb2
    import statement_pb2
    import statement_pb2
    import statement_pb2
    import statement_pb2
    import statement_pb2
    method_service_descriptions = {
        "AddStatement":
        alpha_utilities.unary_unary_service_description(
            servicer.AddStatement,
            statement_pb2.AddStatementReq.FromString,
            statement_pb2.AddStatementRsp.SerializeToString,
        ),
        "GetBookingStatements":
        alpha_utilities.unary_unary_service_description(
            servicer.GetBookingStatements,
            statement_pb2.GetBookingStatementsReq.FromString,
            statement_pb2.GetStatementsRsp.SerializeToString,
        ),
        "GetStatements":
        alpha_utilities.unary_unary_service_description(
            servicer.GetStatements,
            statement_pb2.GetStatementsReq.FromString,
            statement_pb2.GetStatementsRsp.SerializeToString,
        ),
        "GetUserStatements":
        alpha_utilities.unary_unary_service_description(
            servicer.GetUserStatements,
            statement_pb2.GetUserStatementsReq.FromString,
            statement_pb2.GetStatementsRsp.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "Proto.RpcCoupon",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #30
0
def early_adopter_create_RpcLuckyCard_server(servicer,
                                             port,
                                             private_key=None,
                                             certificate_chain=None):
    import base_pb2
    import base_pb2
    import lucky_card_pb2
    import lucky_card_pb2
    import lucky_card_pb2
    import lucky_card_pb2
    import lucky_card_pb2
    import lucky_card_pb2
    method_service_descriptions = {
        "Echo":
        alpha_utilities.unary_unary_service_description(
            servicer.Echo,
            base_pb2.EchoReq.FromString,
            base_pb2.EchoRsp.SerializeToString,
        ),
        "FetchCard":
        alpha_utilities.unary_unary_service_description(
            servicer.FetchCard,
            lucky_card_pb2.FetchCardReq.FromString,
            lucky_card_pb2.FetchCardRsp.SerializeToString,
        ),
        "H5GetCard":
        alpha_utilities.unary_unary_service_description(
            servicer.H5GetCard,
            lucky_card_pb2.H5GetCardReq.FromString,
            lucky_card_pb2.H5GetCardRsp.SerializeToString,
        ),
        "OpenCard":
        alpha_utilities.unary_unary_service_description(
            servicer.OpenCard,
            lucky_card_pb2.OpenCardReq.FromString,
            lucky_card_pb2.OpenCardRsp.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "Proto.RpcLuckyCard",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #31
0
def early_adopter_create_ContentCmdHandler_server(servicer,
                                                  port,
                                                  private_key=None,
                                                  certificate_chain=None):
    import content_pb2
    import content_pb2
    import base_pb2
    import content_pb2
    import base_pb2
    import content_pb2
    import content_pb2
    import content_pb2
    method_service_descriptions = {
        "remove":
        utilities.unary_unary_service_description(
            servicer.remove,
            base_pb2.Uuid.FromString,
            content_pb2.CmdResponse.SerializeToString,
        ),
        "removePart":
        utilities.unary_unary_service_description(
            servicer.removePart,
            base_pb2.Uuid.FromString,
            content_pb2.CmdResponse.SerializeToString,
        ),
        "save":
        utilities.unary_unary_service_description(
            servicer.save,
            content_pb2.Content.FromString,
            content_pb2.CmdResponse.SerializeToString,
        ),
        "updatePart":
        utilities.unary_unary_service_description(
            servicer.updatePart,
            content_pb2.UpdatePart.FromString,
            content_pb2.CmdResponse.SerializeToString,
        ),
    }
    return implementations.server("content.ContentCmdHandler",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #32
0
def early_adopter_create_MnistService_server(servicer, port, private_key=None, certificate_chain=None):
  import mnist_inference_pb2
  import mnist_inference_pb2
  method_service_descriptions = {
    "Classify": alpha_utilities.unary_unary_service_description(
      servicer.Classify,
      mnist_inference_pb2.MnistRequest.FromString,
      mnist_inference_pb2.MnistResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("tensorflow.serving.MnistService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_QueryMasterClientProtocolService_server(servicer, port, private_key=None, certificate_chain=None):
  import ClientProtos_pb2
  import ClientProtos_pb2
  method_service_descriptions = {
    "getQueryHistory": utilities.unary_unary_service_description(
      servicer.getQueryHistory,
      ClientProtos_pb2.QueryIdRequest.FromString,
      ClientProtos_pb2.GetQueryHistoryResponse.SerializeToString,
    ),
  }
  return implementations.server("QueryMasterClientProtocolService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #34
0
def early_adopter_create_CampaignManager_server(servicer, port, private_key=None, certificate_chain=None):
  import consultation_pb2
  import consultation_pb2
  method_service_descriptions = {
    "Retort": alpha_utilities.unary_unary_service_description(
      servicer.Retort,
      consultation_pb2.RetortRequest.FromString,
      consultation_pb2.RetortReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("consultation.CampaignManager", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #35
0
def early_adopter_create_RpcHomePage_server(servicer, port, private_key=None, certificate_chain=None):
  import homepage_pb2
  import homepage_pb2
  method_service_descriptions = {
    "GetHomePage": alpha_utilities.unary_unary_service_description(
      servicer.GetHomePage,
      homepage_pb2.HomePageReq.FromString,
      homepage_pb2.HomePageRsp.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("Proto.RpcHomePage", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #36
0
def early_adopter_create_RpcIdAlloc_server(servicer, port, private_key=None, certificate_chain=None):
  import id_alloc_pb2
  import id_alloc_pb2
  method_service_descriptions = {
    "GetId": alpha_utilities.unary_unary_service_description(
      servicer.GetId,
      id_alloc_pb2.GetIdReq.FromString,
      id_alloc_pb2.GetIdRsp.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("Proto.RpcIdAlloc", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #37
0
def early_adopter_create_EventStore_server(servicer, port, private_key=None, certificate_chain=None):
  import base_pb2
  import event_store_pb2
  method_service_descriptions = {
    "get": utilities.unary_unary_service_description(
      servicer.get,
      base_pb2.Uuid.FromString,
      event_store_pb2.EventStream.SerializeToString,
    ),
  }
  return implementations.server("event.EventStore", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #38
0
def early_adopter_create_Greeter_server(servicer, port, private_key=None, certificate_chain=None):
  import helloworld_pb2
  import helloworld_pb2
  method_service_descriptions = {
    "SayHello": alpha_utilities.unary_unary_service_description(
      servicer.SayHello,
      helloworld_pb2.HelloRequest.FromString,
      helloworld_pb2.HelloReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("helloworld.Greeter", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_BigtableClusterService_server(servicer, port, private_key=None, certificate_chain=None):
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_data_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_cluster_data_pb2
  import gcloud.bigtable._generated.bigtable_cluster_data_pb2
  import gcloud.bigtable._generated.bigtable_cluster_data_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import google.protobuf.empty_pb2
  import gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2
  import google.longrunning.operations_pb2
  method_service_descriptions = {
    "CreateCluster": alpha_utilities.unary_unary_service_description(
      servicer.CreateCluster,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.CreateClusterRequest.FromString,
      gcloud.bigtable._generated.bigtable_cluster_data_pb2.Cluster.SerializeToString,
    ),
    "DeleteCluster": alpha_utilities.unary_unary_service_description(
      servicer.DeleteCluster,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.DeleteClusterRequest.FromString,
      google.protobuf.empty_pb2.Empty.SerializeToString,
    ),
    "GetCluster": alpha_utilities.unary_unary_service_description(
      servicer.GetCluster,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.GetClusterRequest.FromString,
      gcloud.bigtable._generated.bigtable_cluster_data_pb2.Cluster.SerializeToString,
    ),
    "ListClusters": alpha_utilities.unary_unary_service_description(
      servicer.ListClusters,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.ListClustersRequest.FromString,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.ListClustersResponse.SerializeToString,
    ),
    "ListZones": alpha_utilities.unary_unary_service_description(
      servicer.ListZones,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.ListZonesRequest.FromString,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.ListZonesResponse.SerializeToString,
    ),
    "UndeleteCluster": alpha_utilities.unary_unary_service_description(
      servicer.UndeleteCluster,
      gcloud.bigtable._generated.bigtable_cluster_service_messages_pb2.UndeleteClusterRequest.FromString,
      google.longrunning.operations_pb2.Operation.SerializeToString,
    ),
    "UpdateCluster": alpha_utilities.unary_unary_service_description(
      servicer.UpdateCluster,
      gcloud.bigtable._generated.bigtable_cluster_data_pb2.Cluster.FromString,
      gcloud.bigtable._generated.bigtable_cluster_data_pb2.Cluster.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("google.bigtable.admin.cluster.v1.BigtableClusterService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #40
0
def early_adopter_create_MysqlCtl_server(servicer,
                                         port,
                                         private_key=None,
                                         certificate_chain=None):
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    import mysqlctl_pb2
    method_service_descriptions = {
        "RunMysqlUpgrade":
        alpha_utilities.unary_unary_service_description(
            servicer.RunMysqlUpgrade,
            mysqlctl_pb2.RunMysqlUpgradeRequest.FromString,
            mysqlctl_pb2.RunMysqlUpgradeResponse.SerializeToString,
        ),
        "Shutdown":
        alpha_utilities.unary_unary_service_description(
            servicer.Shutdown,
            mysqlctl_pb2.ShutdownRequest.FromString,
            mysqlctl_pb2.ShutdownResponse.SerializeToString,
        ),
        "Start":
        alpha_utilities.unary_unary_service_description(
            servicer.Start,
            mysqlctl_pb2.StartRequest.FromString,
            mysqlctl_pb2.StartResponse.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "mysqlctl.MysqlCtl",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #41
0
파일: service_pb2.py 프로젝트: kunal10/Vurb
def early_adopter_create_DataRetrieval_server(servicer,
                                              port,
                                              private_key=None,
                                              certificate_chain=None):
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    method_service_descriptions = {
        "GetDeck":
        alpha_utilities.unary_unary_service_description(
            servicer.GetDeck,
            service_pb2.DeckRequest.FromString,
            service_pb2.DeckResponse.SerializeToString,
        ),
        "GetDetailedUserDeck":
        alpha_utilities.unary_unary_service_description(
            servicer.GetDetailedUserDeck,
            service_pb2.UserDeckRequest.FromString,
            service_pb2.UserDeckResponse.SerializeToString,
        ),
        "GetUserDeck":
        alpha_utilities.unary_unary_service_description(
            servicer.GetUserDeck,
            service_pb2.UserDeckRequest.FromString,
            service_pb2.UserDeckResponse.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "exercise.DataRetrieval",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #42
0
def early_adopter_create_JobsService_server(servicer, port, private_key=None, certificate_chain=None):
    import jobs_pb2
    method_service_descriptions = {
        "GetCount": alpha_utilities.unary_unary_service_description(
                servicer.GetCount,
                jobs_pb2.Void.FromString,
                jobs_pb2.Int.SerializeToString,
        ),
        "GetJobs": alpha_utilities.unary_stream_service_description(
                servicer.GetJobs,
                jobs_pb2.SearchOptions.FromString,
                jobs_pb2.JobInfo.SerializeToString,
        ),
    }
    return early_adopter_implementations.server("jobs.JobsService", method_service_descriptions, port,
                                                private_key=private_key, certificate_chain=certificate_chain)
예제 #43
0
def early_adopter_create_RouteGuide_server(servicer,
                                           port,
                                           private_key=None,
                                           certificate_chain=None):
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    import route_guide_pb2
    method_service_descriptions = {
        "GetFeature":
        alpha_utilities.unary_unary_service_description(
            servicer.GetFeature,
            route_guide_pb2.Point.FromString,
            route_guide_pb2.Feature.SerializeToString,
        ),
        "ListFeatures":
        alpha_utilities.unary_stream_service_description(
            servicer.ListFeatures,
            route_guide_pb2.Rectangle.FromString,
            route_guide_pb2.Feature.SerializeToString,
        ),
        "RecordRoute":
        alpha_utilities.stream_unary_service_description(
            servicer.RecordRoute,
            route_guide_pb2.Point.FromString,
            route_guide_pb2.RouteSummary.SerializeToString,
        ),
        "RouteChat":
        alpha_utilities.stream_stream_service_description(
            servicer.RouteChat,
            route_guide_pb2.RouteNote.FromString,
            route_guide_pb2.RouteNote.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "routeguide.RouteGuide",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #44
0
def early_adopter_create_EventStore_server(servicer,
                                           port,
                                           private_key=None,
                                           certificate_chain=None):
    import base_pb2
    import event_store_pb2
    method_service_descriptions = {
        "get":
        utilities.unary_unary_service_description(
            servicer.get,
            base_pb2.Uuid.FromString,
            event_store_pb2.EventStream.SerializeToString,
        ),
    }
    return implementations.server("event.EventStore",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
예제 #45
0
def early_adopter_create_SmsRouter_server(servicer,
                                          port,
                                          private_key=None,
                                          certificate_chain=None):
    import sms_router_pb2
    import sms_router_pb2
    method_service_descriptions = {
        "GetRouter":
        alpha_utilities.unary_unary_service_description(
            servicer.GetRouter,
            sms_router_pb2.GetRouterReq.FromString,
            sms_router_pb2.GetRouterRsp.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "Proto.SmsRouter",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #46
0
def early_adopter_create_CampaignManager_server(servicer,
                                                port,
                                                private_key=None,
                                                certificate_chain=None):
    import consultation_pb2
    import consultation_pb2
    method_service_descriptions = {
        "Retort":
        alpha_utilities.unary_unary_service_description(
            servicer.Retort,
            consultation_pb2.RetortRequest.FromString,
            consultation_pb2.RetortReply.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "consultation.CampaignManager",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
def early_adopter_create_MnistService_server(servicer,
                                             port,
                                             private_key=None,
                                             certificate_chain=None):
    import mnist_inference_pb2
    import mnist_inference_pb2
    method_service_descriptions = {
        "Classify":
        alpha_utilities.unary_unary_service_description(
            servicer.Classify,
            mnist_inference_pb2.MnistRequest.FromString,
            mnist_inference_pb2.MnistResponse.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "tensorflow.serving.MnistService",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #48
0
def early_adopter_create_Greeter_server(servicer,
                                        port,
                                        private_key=None,
                                        certificate_chain=None):
    import helloworld_pb2
    import helloworld_pb2
    method_service_descriptions = {
        "SayHello":
        alpha_utilities.unary_unary_service_description(
            servicer.SayHello,
            helloworld_pb2.HelloRequest.FromString,
            helloworld_pb2.HelloReply.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "helloworld.Greeter",
        method_service_descriptions,
        port,
        private_key=private_key,
        certificate_chain=certificate_chain)
예제 #49
0
def early_adopter_create_Datastore_server(servicer, port, private_key=None, certificate_chain=None):
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  import gcloud.datastore._generated.datastore_pb2
  method_service_descriptions = {
    "AllocateIds": alpha_utilities.unary_unary_service_description(
      servicer.AllocateIds,
      gcloud.datastore._generated.datastore_pb2.AllocateIdsRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.AllocateIdsResponse.SerializeToString,
    ),
    "BeginTransaction": alpha_utilities.unary_unary_service_description(
      servicer.BeginTransaction,
      gcloud.datastore._generated.datastore_pb2.BeginTransactionRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.BeginTransactionResponse.SerializeToString,
    ),
    "Commit": alpha_utilities.unary_unary_service_description(
      servicer.Commit,
      gcloud.datastore._generated.datastore_pb2.CommitRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.CommitResponse.SerializeToString,
    ),
    "Lookup": alpha_utilities.unary_unary_service_description(
      servicer.Lookup,
      gcloud.datastore._generated.datastore_pb2.LookupRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.LookupResponse.SerializeToString,
    ),
    "Rollback": alpha_utilities.unary_unary_service_description(
      servicer.Rollback,
      gcloud.datastore._generated.datastore_pb2.RollbackRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.RollbackResponse.SerializeToString,
    ),
    "RunQuery": alpha_utilities.unary_unary_service_description(
      servicer.RunQuery,
      gcloud.datastore._generated.datastore_pb2.RunQueryRequest.FromString,
      gcloud.datastore._generated.datastore_pb2.RunQueryResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("google.datastore.v1beta3.Datastore", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #50
0
def early_adopter_create_Vitess_server(servicer, port, root_certificates,
                                       key_chain_pairs):
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    import vtgate_pb2
    method_service_descriptions = {
        "Begin":
        utilities.unary_unary_service_description(
            servicer.Begin,
            vtgate_pb2.BeginRequest.FromString,
            vtgate_pb2.BeginResponse.SerializeToString,
        ),
        "Commit":
        utilities.unary_unary_service_description(
            servicer.Commit,
            vtgate_pb2.CommitRequest.FromString,
            vtgate_pb2.CommitResponse.SerializeToString,
        ),
        "Execute":
        utilities.unary_unary_service_description(
            servicer.Execute,
            vtgate_pb2.ExecuteRequest.FromString,
            vtgate_pb2.ExecuteResponse.SerializeToString,
        ),
        "ExecuteBatchKeyspaceIds":
        utilities.unary_unary_service_description(
            servicer.ExecuteBatchKeyspaceIds,
            vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.FromString,
            vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString,
        ),
        "ExecuteBatchShards":
        utilities.unary_unary_service_description(
            servicer.ExecuteBatchShards,
            vtgate_pb2.ExecuteBatchShardsRequest.FromString,
            vtgate_pb2.ExecuteBatchShardsResponse.SerializeToString,
        ),
        "ExecuteEntityIds":
        utilities.unary_unary_service_description(
            servicer.ExecuteEntityIds,
            vtgate_pb2.ExecuteEntityIdsRequest.FromString,
            vtgate_pb2.ExecuteEntityIdsResponse.SerializeToString,
        ),
        "ExecuteKeyRanges":
        utilities.unary_unary_service_description(
            servicer.ExecuteKeyRanges,
            vtgate_pb2.ExecuteKeyRangesRequest.FromString,
            vtgate_pb2.ExecuteKeyRangesResponse.SerializeToString,
        ),
        "ExecuteKeyspaceIds":
        utilities.unary_unary_service_description(
            servicer.ExecuteKeyspaceIds,
            vtgate_pb2.ExecuteKeyspaceIdsRequest.FromString,
            vtgate_pb2.ExecuteKeyspaceIdsResponse.SerializeToString,
        ),
        "ExecuteShards":
        utilities.unary_unary_service_description(
            servicer.ExecuteShards,
            vtgate_pb2.ExecuteShardsRequest.FromString,
            vtgate_pb2.ExecuteShardsResponse.SerializeToString,
        ),
        "GetSrvKeyspace":
        utilities.unary_unary_service_description(
            servicer.GetSrvKeyspace,
            vtgate_pb2.GetSrvKeyspaceRequest.FromString,
            vtgate_pb2.GetSrvKeyspaceResponse.SerializeToString,
        ),
        "Rollback":
        utilities.unary_unary_service_description(
            servicer.Rollback,
            vtgate_pb2.RollbackRequest.FromString,
            vtgate_pb2.RollbackResponse.SerializeToString,
        ),
        "SplitQuery":
        utilities.unary_unary_service_description(
            servicer.SplitQuery,
            vtgate_pb2.SplitQueryRequest.FromString,
            vtgate_pb2.SplitQueryResponse.SerializeToString,
        ),
        "StreamExecute":
        utilities.unary_stream_service_description(
            servicer.StreamExecute,
            vtgate_pb2.StreamExecuteRequest.FromString,
            vtgate_pb2.StreamExecuteResponse.SerializeToString,
        ),
        "StreamExecuteKeyRanges":
        utilities.unary_stream_service_description(
            servicer.StreamExecuteKeyRanges,
            vtgate_pb2.StreamExecuteKeyRangesRequest.FromString,
            vtgate_pb2.StreamExecuteKeyRangesResponse.SerializeToString,
        ),
        "StreamExecuteKeyspaceIds":
        utilities.unary_stream_service_description(
            servicer.StreamExecuteKeyspaceIds,
            vtgate_pb2.StreamExecuteKeyspaceIdsRequest.FromString,
            vtgate_pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString,
        ),
        "StreamExecuteShards":
        utilities.unary_stream_service_description(
            servicer.StreamExecuteShards,
            vtgate_pb2.StreamExecuteShardsRequest.FromString,
            vtgate_pb2.StreamExecuteShardsResponse.SerializeToString,
        ),
    }
    return implementations.secure_server("vtgateservice.Vitess",
                                         method_service_descriptions, port,
                                         root_certificates, key_chain_pairs)
예제 #51
0
def early_adopter_create_ZfsRpc_server(servicer, port, private_key=None, certificate_chain=None):
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  import zfs_pb2
  method_service_descriptions = {
    "CreateFile": alpha_utilities.unary_unary_service_description(
      servicer.CreateFile,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "Fetch": alpha_utilities.unary_stream_service_description(
      servicer.Fetch,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.FileDataBlock.SerializeToString,
    ),
    "FetchDir": alpha_utilities.unary_stream_service_description(
      servicer.FetchDir,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.DirListBlock.SerializeToString,
    ),
    "GetFileStat": alpha_utilities.unary_unary_service_description(
      servicer.GetFileStat,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.FileStat.SerializeToString,
    ),
    "MakeDir": alpha_utilities.unary_unary_service_description(
      servicer.MakeDir,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "RemoveDir": alpha_utilities.unary_unary_service_description(
      servicer.RemoveDir,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "RemoveFile": alpha_utilities.unary_unary_service_description(
      servicer.RemoveFile,
      zfs_pb2.FilePath.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "Rename": alpha_utilities.unary_unary_service_description(
      servicer.Rename,
      zfs_pb2.RenameMsg.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "SetFileStat": alpha_utilities.unary_unary_service_description(
      servicer.SetFileStat,
      zfs_pb2.FileStat.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "Store": alpha_utilities.stream_unary_service_description(
      servicer.Store,
      zfs_pb2.FileDataBlock.FromString,
      zfs_pb2.StdReply.SerializeToString,
    ),
    "TestAuth": alpha_utilities.unary_unary_service_description(
      servicer.TestAuth,
      zfs_pb2.TestAuthRequest.FromString,
      zfs_pb2.TestAuthReply.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("zfs.ZfsRpc", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #52
0
def early_adopter_create_Vitess_server(servicer, port, private_key=None, certificate_chain=None):
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  import vtgate_pb2
  method_service_descriptions = {
    "Begin": utilities.unary_unary_service_description(
      servicer.Begin,
      vtgate_pb2.BeginRequest.FromString,
      vtgate_pb2.BeginResponse.SerializeToString,
    ),
    "Commit": utilities.unary_unary_service_description(
      servicer.Commit,
      vtgate_pb2.CommitRequest.FromString,
      vtgate_pb2.CommitResponse.SerializeToString,
    ),
    "Execute": utilities.unary_unary_service_description(
      servicer.Execute,
      vtgate_pb2.ExecuteRequest.FromString,
      vtgate_pb2.ExecuteResponse.SerializeToString,
    ),
    "ExecuteBatchKeyspaceIds": utilities.unary_unary_service_description(
      servicer.ExecuteBatchKeyspaceIds,
      vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.FromString,
      vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString,
    ),
    "ExecuteBatchShards": utilities.unary_unary_service_description(
      servicer.ExecuteBatchShards,
      vtgate_pb2.ExecuteBatchShardsRequest.FromString,
      vtgate_pb2.ExecuteBatchShardsResponse.SerializeToString,
    ),
    "ExecuteEntityIds": utilities.unary_unary_service_description(
      servicer.ExecuteEntityIds,
      vtgate_pb2.ExecuteEntityIdsRequest.FromString,
      vtgate_pb2.ExecuteEntityIdsResponse.SerializeToString,
    ),
    "ExecuteKeyRanges": utilities.unary_unary_service_description(
      servicer.ExecuteKeyRanges,
      vtgate_pb2.ExecuteKeyRangesRequest.FromString,
      vtgate_pb2.ExecuteKeyRangesResponse.SerializeToString,
    ),
    "ExecuteKeyspaceIds": utilities.unary_unary_service_description(
      servicer.ExecuteKeyspaceIds,
      vtgate_pb2.ExecuteKeyspaceIdsRequest.FromString,
      vtgate_pb2.ExecuteKeyspaceIdsResponse.SerializeToString,
    ),
    "ExecuteShards": utilities.unary_unary_service_description(
      servicer.ExecuteShards,
      vtgate_pb2.ExecuteShardsRequest.FromString,
      vtgate_pb2.ExecuteShardsResponse.SerializeToString,
    ),
    "GetSrvKeyspace": utilities.unary_unary_service_description(
      servicer.GetSrvKeyspace,
      vtgate_pb2.GetSrvKeyspaceRequest.FromString,
      vtgate_pb2.GetSrvKeyspaceResponse.SerializeToString,
    ),
    "Rollback": utilities.unary_unary_service_description(
      servicer.Rollback,
      vtgate_pb2.RollbackRequest.FromString,
      vtgate_pb2.RollbackResponse.SerializeToString,
    ),
    "SplitQuery": utilities.unary_unary_service_description(
      servicer.SplitQuery,
      vtgate_pb2.SplitQueryRequest.FromString,
      vtgate_pb2.SplitQueryResponse.SerializeToString,
    ),
    "StreamExecute": utilities.unary_stream_service_description(
      servicer.StreamExecute,
      vtgate_pb2.StreamExecuteRequest.FromString,
      vtgate_pb2.StreamExecuteResponse.SerializeToString,
    ),
    "StreamExecuteKeyRanges": utilities.unary_stream_service_description(
      servicer.StreamExecuteKeyRanges,
      vtgate_pb2.StreamExecuteKeyRangesRequest.FromString,
      vtgate_pb2.StreamExecuteKeyRangesResponse.SerializeToString,
    ),
    "StreamExecuteKeyspaceIds": utilities.unary_stream_service_description(
      servicer.StreamExecuteKeyspaceIds,
      vtgate_pb2.StreamExecuteKeyspaceIdsRequest.FromString,
      vtgate_pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString,
    ),
    "StreamExecuteShards": utilities.unary_stream_service_description(
      servicer.StreamExecuteShards,
      vtgate_pb2.StreamExecuteShardsRequest.FromString,
      vtgate_pb2.StreamExecuteShardsResponse.SerializeToString,
    ),
  }
  return implementations.server("vtgateservice.Vitess", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_TajoMasterClientProtocolService_server(servicer, port, private_key=None, certificate_chain=None):
  import ClientProtos_pb2
  import ClientProtos_pb2
  import TajoIdProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import TajoIdProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import TajoIdProtos_pb2
  import PrimitiveProtos_pb2
  import TajoIdProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import PrimitiveProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  import ClientProtos_pb2
  method_service_descriptions = {
    "closeNonForwardQuery": utilities.unary_unary_service_description(
      servicer.closeNonForwardQuery,
      ClientProtos_pb2.QueryIdRequest.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "createDatabase": utilities.unary_unary_service_description(
      servicer.createDatabase,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "createExternalTable": utilities.unary_unary_service_description(
      servicer.createExternalTable,
      ClientProtos_pb2.CreateTableRequest.FromString,
      ClientProtos_pb2.TableResponse.SerializeToString,
    ),
    "createSession": utilities.unary_unary_service_description(
      servicer.createSession,
      ClientProtos_pb2.CreateSessionRequest.FromString,
      ClientProtos_pb2.CreateSessionResponse.SerializeToString,
    ),
    "dropDatabase": utilities.unary_unary_service_description(
      servicer.dropDatabase,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "dropTable": utilities.unary_unary_service_description(
      servicer.dropTable,
      ClientProtos_pb2.DropTableRequest.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "existDatabase": utilities.unary_unary_service_description(
      servicer.existDatabase,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "existSessionVariable": utilities.unary_unary_service_description(
      servicer.existSessionVariable,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "existTable": utilities.unary_unary_service_description(
      servicer.existTable,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "getAllDatabases": utilities.unary_unary_service_description(
      servicer.getAllDatabases,
      TajoIdProtos_pb2.SessionIdProto.FromString,
      PrimitiveProtos_pb2.StringListProto.SerializeToString,
    ),
    "getAllSessionVariables": utilities.unary_unary_service_description(
      servicer.getAllSessionVariables,
      TajoIdProtos_pb2.SessionIdProto.FromString,
      PrimitiveProtos_pb2.KeyValueSetProto.SerializeToString,
    ),
    "getClusterInfo": utilities.unary_unary_service_description(
      servicer.getClusterInfo,
      ClientProtos_pb2.GetClusterInfoRequest.FromString,
      ClientProtos_pb2.GetClusterInfoResponse.SerializeToString,
    ),
    "getCurrentDatabase": utilities.unary_unary_service_description(
      servicer.getCurrentDatabase,
      TajoIdProtos_pb2.SessionIdProto.FromString,
      PrimitiveProtos_pb2.StringProto.SerializeToString,
    ),
    "getFinishedQueryList": utilities.unary_unary_service_description(
      servicer.getFinishedQueryList,
      ClientProtos_pb2.GetQueryListRequest.FromString,
      ClientProtos_pb2.GetQueryListResponse.SerializeToString,
    ),
    "getFunctionList": utilities.unary_unary_service_description(
      servicer.getFunctionList,
      ClientProtos_pb2.SessionedStringProto.FromString,
      ClientProtos_pb2.FunctionResponse.SerializeToString,
    ),
    "getQueryInfo": utilities.unary_unary_service_description(
      servicer.getQueryInfo,
      ClientProtos_pb2.QueryIdRequest.FromString,
      ClientProtos_pb2.GetQueryInfoResponse.SerializeToString,
    ),
    "getQueryResult": utilities.unary_unary_service_description(
      servicer.getQueryResult,
      ClientProtos_pb2.GetQueryResultRequest.FromString,
      ClientProtos_pb2.GetQueryResultResponse.SerializeToString,
    ),
    "getQueryResultData": utilities.unary_unary_service_description(
      servicer.getQueryResultData,
      ClientProtos_pb2.GetQueryResultDataRequest.FromString,
      ClientProtos_pb2.GetQueryResultDataResponse.SerializeToString,
    ),
    "getQueryStatus": utilities.unary_unary_service_description(
      servicer.getQueryStatus,
      ClientProtos_pb2.GetQueryStatusRequest.FromString,
      ClientProtos_pb2.GetQueryStatusResponse.SerializeToString,
    ),
    "getRunningQueryList": utilities.unary_unary_service_description(
      servicer.getRunningQueryList,
      ClientProtos_pb2.GetQueryListRequest.FromString,
      ClientProtos_pb2.GetQueryListResponse.SerializeToString,
    ),
    "getSessionVariable": utilities.unary_unary_service_description(
      servicer.getSessionVariable,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.StringProto.SerializeToString,
    ),
    "getTableDesc": utilities.unary_unary_service_description(
      servicer.getTableDesc,
      ClientProtos_pb2.GetTableDescRequest.FromString,
      ClientProtos_pb2.TableResponse.SerializeToString,
    ),
    "getTableList": utilities.unary_unary_service_description(
      servicer.getTableList,
      ClientProtos_pb2.GetTableListRequest.FromString,
      ClientProtos_pb2.GetTableListResponse.SerializeToString,
    ),
    "killQuery": utilities.unary_unary_service_description(
      servicer.killQuery,
      ClientProtos_pb2.QueryIdRequest.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "removeSession": utilities.unary_unary_service_description(
      servicer.removeSession,
      TajoIdProtos_pb2.SessionIdProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "selectDatabase": utilities.unary_unary_service_description(
      servicer.selectDatabase,
      ClientProtos_pb2.SessionedStringProto.FromString,
      PrimitiveProtos_pb2.BoolProto.SerializeToString,
    ),
    "submitQuery": utilities.unary_unary_service_description(
      servicer.submitQuery,
      ClientProtos_pb2.QueryRequest.FromString,
      ClientProtos_pb2.SubmitQueryResponse.SerializeToString,
    ),
    "updateQuery": utilities.unary_unary_service_description(
      servicer.updateQuery,
      ClientProtos_pb2.QueryRequest.FromString,
      ClientProtos_pb2.UpdateQueryResponse.SerializeToString,
    ),
    "updateSessionVariables": utilities.unary_unary_service_description(
      servicer.updateSessionVariables,
      ClientProtos_pb2.UpdateSessionVariableRequest.FromString,
      ClientProtos_pb2.SessionUpdateResponse.SerializeToString,
    ),
  }
  return implementations.server("TajoMasterClientProtocolService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
예제 #54
0
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    DIV_MANY:
    utilities.stream_stream_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    FIB:
    utilities.unary_stream_invocation_description(
        math_pb2.FibArgs.SerializeToString, math_pb2.Num.FromString),
    SUM:
    utilities.stream_unary_invocation_description(
        math_pb2.Num.SerializeToString, math_pb2.Num.FromString),
}

_SERVICE_DESCRIPTIONS = {
    DIV:
    utilities.unary_unary_service_description(
        _div, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    DIV_MANY:
    utilities.stream_stream_service_description(
        _div_many, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    FIB:
    utilities.unary_stream_service_description(_fib,
                                               math_pb2.FibArgs.FromString,
                                               math_pb2.Num.SerializeToString),
    SUM:
    utilities.stream_unary_service_description(_sum, math_pb2.Num.FromString,
                                               math_pb2.Num.SerializeToString),
}

_TIMEOUT = 3
def early_adopter_create_TabletManager_server(servicer, port, root_certificates, key_chain_pairs):
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  import tabletmanagerdata_pb2
  method_service_descriptions = {
    "ApplySchema": utilities.unary_unary_service_description(
      servicer.ApplySchema,
      tabletmanagerdata_pb2.ApplySchemaRequest.FromString,
      tabletmanagerdata_pb2.ApplySchemaResponse.SerializeToString,
    ),
    "Backup": utilities.unary_stream_service_description(
      servicer.Backup,
      tabletmanagerdata_pb2.BackupRequest.FromString,
      tabletmanagerdata_pb2.BackupResponse.SerializeToString,
    ),
    "ChangeType": utilities.unary_unary_service_description(
      servicer.ChangeType,
      tabletmanagerdata_pb2.ChangeTypeRequest.FromString,
      tabletmanagerdata_pb2.ChangeTypeResponse.SerializeToString,
    ),
    "DemoteMaster": utilities.unary_unary_service_description(
      servicer.DemoteMaster,
      tabletmanagerdata_pb2.DemoteMasterRequest.FromString,
      tabletmanagerdata_pb2.DemoteMasterResponse.SerializeToString,
    ),
    "ExecuteFetchAsApp": utilities.unary_unary_service_description(
      servicer.ExecuteFetchAsApp,
      tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.FromString,
      tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.SerializeToString,
    ),
    "ExecuteFetchAsDba": utilities.unary_unary_service_description(
      servicer.ExecuteFetchAsDba,
      tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.FromString,
      tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.SerializeToString,
    ),
    "ExecuteHook": utilities.unary_unary_service_description(
      servicer.ExecuteHook,
      tabletmanagerdata_pb2.ExecuteHookRequest.FromString,
      tabletmanagerdata_pb2.ExecuteHookResponse.SerializeToString,
    ),
    "GetPermissions": utilities.unary_unary_service_description(
      servicer.GetPermissions,
      tabletmanagerdata_pb2.GetPermissionsRequest.FromString,
      tabletmanagerdata_pb2.GetPermissionsResponse.SerializeToString,
    ),
    "GetSchema": utilities.unary_unary_service_description(
      servicer.GetSchema,
      tabletmanagerdata_pb2.GetSchemaRequest.FromString,
      tabletmanagerdata_pb2.GetSchemaResponse.SerializeToString,
    ),
    "GetSlaves": utilities.unary_unary_service_description(
      servicer.GetSlaves,
      tabletmanagerdata_pb2.GetSlavesRequest.FromString,
      tabletmanagerdata_pb2.GetSlavesResponse.SerializeToString,
    ),
    "InitMaster": utilities.unary_unary_service_description(
      servicer.InitMaster,
      tabletmanagerdata_pb2.InitMasterRequest.FromString,
      tabletmanagerdata_pb2.InitMasterResponse.SerializeToString,
    ),
    "InitSlave": utilities.unary_unary_service_description(
      servicer.InitSlave,
      tabletmanagerdata_pb2.InitSlaveRequest.FromString,
      tabletmanagerdata_pb2.InitSlaveResponse.SerializeToString,
    ),
    "MasterPosition": utilities.unary_unary_service_description(
      servicer.MasterPosition,
      tabletmanagerdata_pb2.MasterPositionRequest.FromString,
      tabletmanagerdata_pb2.MasterPositionResponse.SerializeToString,
    ),
    "Ping": utilities.unary_unary_service_description(
      servicer.Ping,
      tabletmanagerdata_pb2.PingRequest.FromString,
      tabletmanagerdata_pb2.PingResponse.SerializeToString,
    ),
    "PopulateReparentJournal": utilities.unary_unary_service_description(
      servicer.PopulateReparentJournal,
      tabletmanagerdata_pb2.PopulateReparentJournalRequest.FromString,
      tabletmanagerdata_pb2.PopulateReparentJournalResponse.SerializeToString,
    ),
    "PreflightSchema": utilities.unary_unary_service_description(
      servicer.PreflightSchema,
      tabletmanagerdata_pb2.PreflightSchemaRequest.FromString,
      tabletmanagerdata_pb2.PreflightSchemaResponse.SerializeToString,
    ),
    "PromoteSlave": utilities.unary_unary_service_description(
      servicer.PromoteSlave,
      tabletmanagerdata_pb2.PromoteSlaveRequest.FromString,
      tabletmanagerdata_pb2.PromoteSlaveResponse.SerializeToString,
    ),
    "PromoteSlaveWhenCaughtUp": utilities.unary_unary_service_description(
      servicer.PromoteSlaveWhenCaughtUp,
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.FromString,
      tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.SerializeToString,
    ),
    "RefreshState": utilities.unary_unary_service_description(
      servicer.RefreshState,
      tabletmanagerdata_pb2.RefreshStateRequest.FromString,
      tabletmanagerdata_pb2.RefreshStateResponse.SerializeToString,
    ),
    "ReloadSchema": utilities.unary_unary_service_description(
      servicer.ReloadSchema,
      tabletmanagerdata_pb2.ReloadSchemaRequest.FromString,
      tabletmanagerdata_pb2.ReloadSchemaResponse.SerializeToString,
    ),
    "ResetReplication": utilities.unary_unary_service_description(
      servicer.ResetReplication,
      tabletmanagerdata_pb2.ResetReplicationRequest.FromString,
      tabletmanagerdata_pb2.ResetReplicationResponse.SerializeToString,
    ),
    "RunBlpUntil": utilities.unary_unary_service_description(
      servicer.RunBlpUntil,
      tabletmanagerdata_pb2.RunBlpUntilRequest.FromString,
      tabletmanagerdata_pb2.RunBlpUntilResponse.SerializeToString,
    ),
    "RunHealthCheck": utilities.unary_unary_service_description(
      servicer.RunHealthCheck,
      tabletmanagerdata_pb2.RunHealthCheckRequest.FromString,
      tabletmanagerdata_pb2.RunHealthCheckResponse.SerializeToString,
    ),
    "Scrap": utilities.unary_unary_service_description(
      servicer.Scrap,
      tabletmanagerdata_pb2.ScrapRequest.FromString,
      tabletmanagerdata_pb2.ScrapResponse.SerializeToString,
    ),
    "SetMaster": utilities.unary_unary_service_description(
      servicer.SetMaster,
      tabletmanagerdata_pb2.SetMasterRequest.FromString,
      tabletmanagerdata_pb2.SetMasterResponse.SerializeToString,
    ),
    "SetReadOnly": utilities.unary_unary_service_description(
      servicer.SetReadOnly,
      tabletmanagerdata_pb2.SetReadOnlyRequest.FromString,
      tabletmanagerdata_pb2.SetReadOnlyResponse.SerializeToString,
    ),
    "SetReadWrite": utilities.unary_unary_service_description(
      servicer.SetReadWrite,
      tabletmanagerdata_pb2.SetReadWriteRequest.FromString,
      tabletmanagerdata_pb2.SetReadWriteResponse.SerializeToString,
    ),
    "SlaveStatus": utilities.unary_unary_service_description(
      servicer.SlaveStatus,
      tabletmanagerdata_pb2.SlaveStatusRequest.FromString,
      tabletmanagerdata_pb2.SlaveStatusResponse.SerializeToString,
    ),
    "SlaveWasPromoted": utilities.unary_unary_service_description(
      servicer.SlaveWasPromoted,
      tabletmanagerdata_pb2.SlaveWasPromotedRequest.FromString,
      tabletmanagerdata_pb2.SlaveWasPromotedResponse.SerializeToString,
    ),
    "SlaveWasRestarted": utilities.unary_unary_service_description(
      servicer.SlaveWasRestarted,
      tabletmanagerdata_pb2.SlaveWasRestartedRequest.FromString,
      tabletmanagerdata_pb2.SlaveWasRestartedResponse.SerializeToString,
    ),
    "Sleep": utilities.unary_unary_service_description(
      servicer.Sleep,
      tabletmanagerdata_pb2.SleepRequest.FromString,
      tabletmanagerdata_pb2.SleepResponse.SerializeToString,
    ),
    "StartBlp": utilities.unary_unary_service_description(
      servicer.StartBlp,
      tabletmanagerdata_pb2.StartBlpRequest.FromString,
      tabletmanagerdata_pb2.StartBlpResponse.SerializeToString,
    ),
    "StartSlave": utilities.unary_unary_service_description(
      servicer.StartSlave,
      tabletmanagerdata_pb2.StartSlaveRequest.FromString,
      tabletmanagerdata_pb2.StartSlaveResponse.SerializeToString,
    ),
    "StopBlp": utilities.unary_unary_service_description(
      servicer.StopBlp,
      tabletmanagerdata_pb2.StopBlpRequest.FromString,
      tabletmanagerdata_pb2.StopBlpResponse.SerializeToString,
    ),
    "StopReplicationAndGetStatus": utilities.unary_unary_service_description(
      servicer.StopReplicationAndGetStatus,
      tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.FromString,
      tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.SerializeToString,
    ),
    "StopSlave": utilities.unary_unary_service_description(
      servicer.StopSlave,
      tabletmanagerdata_pb2.StopSlaveRequest.FromString,
      tabletmanagerdata_pb2.StopSlaveResponse.SerializeToString,
    ),
    "StopSlaveMinimum": utilities.unary_unary_service_description(
      servicer.StopSlaveMinimum,
      tabletmanagerdata_pb2.StopSlaveMinimumRequest.FromString,
      tabletmanagerdata_pb2.StopSlaveMinimumResponse.SerializeToString,
    ),
    "TabletExternallyElected": utilities.unary_unary_service_description(
      servicer.TabletExternallyElected,
      tabletmanagerdata_pb2.TabletExternallyElectedRequest.FromString,
      tabletmanagerdata_pb2.TabletExternallyElectedResponse.SerializeToString,
    ),
    "TabletExternallyReparented": utilities.unary_unary_service_description(
      servicer.TabletExternallyReparented,
      tabletmanagerdata_pb2.TabletExternallyReparentedRequest.FromString,
      tabletmanagerdata_pb2.TabletExternallyReparentedResponse.SerializeToString,
    ),
    "WaitBlpPosition": utilities.unary_unary_service_description(
      servicer.WaitBlpPosition,
      tabletmanagerdata_pb2.WaitBlpPositionRequest.FromString,
      tabletmanagerdata_pb2.WaitBlpPositionResponse.SerializeToString,
    ),
  }
  return implementations.secure_server("tabletmanagerservice.TabletManager", method_service_descriptions, port, root_certificates, key_chain_pairs)
예제 #56
0
from grpc.framework.alpha import utilities
from grpc.framework.alpha import exceptions

from grpc_interop import empty_pb2
from grpc_interop import messages_pb2

_TIMEOUT = 7


def _empty_call(request, unused_context):
  return empty_pb2.Empty()

_CLIENT_EMPTY_CALL = utilities.unary_unary_invocation_description(
    empty_pb2.Empty.SerializeToString, empty_pb2.Empty.FromString)
_SERVER_EMPTY_CALL = utilities.unary_unary_service_description(
    _empty_call, empty_pb2.Empty.FromString,
    empty_pb2.Empty.SerializeToString)


def _unary_call(request, unused_context):
  return messages_pb2.SimpleResponse(
      payload=messages_pb2.Payload(
          type=messages_pb2.COMPRESSABLE,
          body=b'\x00' * request.response_size))

_CLIENT_UNARY_CALL = utilities.unary_unary_invocation_description(
    messages_pb2.SimpleRequest.SerializeToString,
    messages_pb2.SimpleResponse.FromString)
_SERVER_UNARY_CALL = utilities.unary_unary_service_description(
    _unary_call, messages_pb2.SimpleRequest.FromString,
    messages_pb2.SimpleResponse.SerializeToString)
예제 #57
0

_INVOCATION_DESCRIPTIONS = {
    DIV: utilities.unary_unary_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    DIV_MANY: utilities.stream_stream_invocation_description(
        math_pb2.DivArgs.SerializeToString, math_pb2.DivReply.FromString),
    FIB: utilities.unary_stream_invocation_description(
        math_pb2.FibArgs.SerializeToString, math_pb2.Num.FromString),
    SUM: utilities.stream_unary_invocation_description(
        math_pb2.Num.SerializeToString, math_pb2.Num.FromString),
}

_SERVICE_DESCRIPTIONS = {
    DIV: utilities.unary_unary_service_description(
        _div, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    DIV_MANY: utilities.stream_stream_service_description(
        _div_many, math_pb2.DivArgs.FromString,
        math_pb2.DivReply.SerializeToString),
    FIB: utilities.unary_stream_service_description(
        _fib, math_pb2.FibArgs.FromString, math_pb2.Num.SerializeToString),
    SUM: utilities.stream_unary_service_description(
        _sum, math_pb2.Num.FromString, math_pb2.Num.SerializeToString),
}

_TIMEOUT = 3


class EarlyAdopterImplementationsTest(unittest.TestCase):