Ejemplo n.º 1
0
def serve():
    parser = argparse.ArgumentParser()
    parser.add_argument('--port', help='the port on which to serve', type=int)
    parser.add_argument('--use_tls',
                        help='require a secure connection',
                        dest='use_tls',
                        action='store_true')
    args = parser.parse_args()

    if args.use_tls:
        private_key = resources.private_key()
        certificate_chain = resources.certificate_chain()
        server = implementations.server(methods.SERVICE_NAME,
                                        methods.SERVER_METHODS,
                                        args.port,
                                        private_key=private_key,
                                        certificate_chain=certificate_chain)
    else:
        server = implementations.server(methods.SERVICE_NAME,
                                        methods.SERVER_METHODS, args.port)

    server.start()
    logging.info('Server serving.')
    try:
        while True:
            time.sleep(_ONE_DAY_IN_SECONDS)
    except BaseException as e:
        logging.info('Caught exception "%s"; stopping server...', e)
        server.stop()
        logging.info('Server stopped; exiting.')
Ejemplo n.º 2
0
def serve():
    parser = argparse.ArgumentParser()
    parser.add_argument("--port", help="the port on which to serve", type=int)
    parser.add_argument("--use_tls", help="require a secure connection", default=False, type=resources.parse_bool)
    args = parser.parse_args()

    if args.use_tls:
        private_key = resources.private_key()
        certificate_chain = resources.certificate_chain()
        server = implementations.server(
            methods.SERVICE_NAME,
            methods.SERVER_METHODS,
            args.port,
            private_key=private_key,
            certificate_chain=certificate_chain,
        )
    else:
        server = implementations.server(methods.SERVICE_NAME, methods.SERVER_METHODS, args.port)

    server.start()
    logging.info("Server serving.")
    try:
        while True:
            time.sleep(_ONE_DAY_IN_SECONDS)
    except BaseException as e:
        logging.info('Caught exception "%s"; stopping server...', e)
        server.stop()
        logging.info("Server stopped; exiting.")
Ejemplo n.º 3
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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
def early_adopter_create_UpdateStream_server(servicer, port, private_key=None, certificate_chain=None):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2

    method_service_descriptions = {
        "StreamKeyRange": alpha_utilities.unary_stream_service_description(
            servicer.StreamKeyRange,
            binlogdata_pb2.StreamKeyRangeRequest.FromString,
            binlogdata_pb2.StreamKeyRangeResponse.SerializeToString,
        ),
        "StreamTables": alpha_utilities.unary_stream_service_description(
            servicer.StreamTables,
            binlogdata_pb2.StreamTablesRequest.FromString,
            binlogdata_pb2.StreamTablesResponse.SerializeToString,
        ),
        "StreamUpdate": alpha_utilities.unary_stream_service_description(
            servicer.StreamUpdate,
            binlogdata_pb2.StreamUpdateRequest.FromString,
            binlogdata_pb2.StreamUpdateResponse.SerializeToString,
        ),
    }
    return early_adopter_implementations.server(
        "binlogservice.UpdateStream",
        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)
Ejemplo n.º 8
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)
Ejemplo n.º 9
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)
Ejemplo n.º 10
0
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)
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)
Ejemplo n.º 12
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)
Ejemplo n.º 13
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,
    )
Ejemplo n.º 14
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)
Ejemplo n.º 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)
Ejemplo n.º 16
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)
Ejemplo n.º 17
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)
Ejemplo n.º 18
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)
Ejemplo n.º 19
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)
Ejemplo n.º 20
0
 def setUp(self):
   self.server = implementations.server(
       SERVICE_NAME, _SERVICE_DESCRIPTIONS, 0)
   self.server.start()
   port = self.server.port()
   self.stub = implementations.stub(
       SERVICE_NAME, _INVOCATION_DESCRIPTIONS, 'localhost', port)
Ejemplo n.º 21
0
 def setUp(self):
   self.server = implementations.server(
       methods.SERVICE_NAME, methods.SERVER_METHODS, 0)
   self.server.start()
   port = self.server.port()
   self.stub = implementations.stub(
       methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port)
Ejemplo n.º 22
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)
Ejemplo n.º 23
0
def early_adopter_create_UpdateStream_server(servicer,
                                             port,
                                             private_key=None,
                                             certificate_chain=None):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    method_service_descriptions = {
        "StreamKeyRange":
        utilities.unary_stream_service_description(
            servicer.StreamKeyRange,
            binlogdata_pb2.StreamKeyRangeRequest.FromString,
            binlogdata_pb2.StreamKeyRangeResponse.SerializeToString,
        ),
        "StreamTables":
        utilities.unary_stream_service_description(
            servicer.StreamTables,
            binlogdata_pb2.StreamTablesRequest.FromString,
            binlogdata_pb2.StreamTablesResponse.SerializeToString,
        ),
        "StreamUpdate":
        utilities.unary_stream_service_description(
            servicer.StreamUpdate,
            binlogdata_pb2.StreamUpdateRequest.FromString,
            binlogdata_pb2.StreamUpdateResponse.SerializeToString,
        ),
    }
    return implementations.server("binlogservice.UpdateStream",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
Ejemplo n.º 24
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)
Ejemplo n.º 25
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)
Ejemplo n.º 26
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)
Ejemplo n.º 27
0
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)
Ejemplo n.º 28
0
 def setUp(self):
     self.server = implementations.server(SERVICE_NAME,
                                          _SERVICE_DESCRIPTIONS, 0)
     self.server.start()
     port = self.server.port()
     self.stub = implementations.stub(SERVICE_NAME,
                                      _INVOCATION_DESCRIPTIONS, 'localhost',
                                      port)
Ejemplo n.º 29
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)
Ejemplo n.º 30
0
 def setUp(self):
   self.server = implementations.server(
       methods.SERVICE_NAME, methods.SERVER_METHODS, 0,
       private_key=resources.private_key(),
       certificate_chain=resources.certificate_chain())
   self.server.start()
   port = self.server.port()
   self.stub = implementations.stub(
       methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port,
       secure=True, root_certificates=resources.test_root_certificates(),
       server_host_override=_SERVER_HOST_OVERRIDE)
Ejemplo n.º 31
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)
Ejemplo n.º 32
0
def early_adopter_create_Vtworker_server(servicer, port, private_key=None, certificate_chain=None):
  import vtworkerdata_pb2
  import vtworkerdata_pb2
  method_service_descriptions = {
    "ExecuteVtworkerCommand": alpha_utilities.unary_stream_service_description(
      servicer.ExecuteVtworkerCommand,
      vtworkerdata_pb2.ExecuteVtworkerCommandRequest.FromString,
      vtworkerdata_pb2.ExecuteVtworkerCommandResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("vtworkerservice.Vtworker", 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)
Ejemplo n.º 34
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)
Ejemplo n.º 35
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)
Ejemplo n.º 36
0
def early_adopter_create_Vtctl_server(servicer, port, private_key=None, certificate_chain=None):
  import vtctldata_pb2
  import vtctldata_pb2
  method_service_descriptions = {
    "ExecuteVtctlCommand": utilities.unary_stream_service_description(
      servicer.ExecuteVtctlCommand,
      vtctldata_pb2.ExecuteVtctlCommandRequest.FromString,
      vtctldata_pb2.ExecuteVtctlCommandResponse.SerializeToString,
    ),
  }
  return implementations.server("vtctlservice.Vtctl", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
Ejemplo n.º 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)
Ejemplo n.º 38
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_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)
Ejemplo n.º 40
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)
Ejemplo n.º 41
0
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)
Ejemplo n.º 42
0
 def setUp(self):
     self.server = implementations.server(
         methods.SERVICE_NAME,
         methods.SERVER_METHODS,
         0,
         private_key=resources.private_key(),
         certificate_chain=resources.certificate_chain())
     self.server.start()
     port = self.server.port()
     self.stub = implementations.stub(
         methods.SERVICE_NAME,
         methods.CLIENT_METHODS,
         'localhost',
         port,
         secure=True,
         root_certificates=resources.test_root_certificates(),
         server_host_override=_SERVER_HOST_OVERRIDE)
Ejemplo n.º 43
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,
    )
Ejemplo n.º 44
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)
Ejemplo n.º 45
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)
Ejemplo n.º 46
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)
Ejemplo n.º 47
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)
Ejemplo n.º 48
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)
Ejemplo n.º 49
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)
Ejemplo n.º 50
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)
Ejemplo n.º 51
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)
Ejemplo n.º 52
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)
Ejemplo n.º 53
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)
Ejemplo n.º 54
0
def early_adopter_create_Vtctl_server(servicer,
                                      port,
                                      private_key=None,
                                      certificate_chain=None):
    import vtctl_pb2
    import vtctl_pb2
    method_service_descriptions = {
        "ExecuteVtctlCommand":
        utilities.unary_stream_service_description(
            servicer.ExecuteVtctlCommand,
            vtctl_pb2.ExecuteVtctlCommandArgs.FromString,
            vtctl_pb2.LoggerEvent.SerializeToString,
        ),
    }
    return implementations.server("vtctl.Vtctl",
                                  method_service_descriptions,
                                  port,
                                  private_key=private_key,
                                  certificate_chain=certificate_chain)
Ejemplo n.º 55
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)
Ejemplo n.º 56
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)
Ejemplo n.º 57
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)