當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript core.TaskExecutor類代碼示例

本文整理匯總了TypeScript中@spinnaker/core.TaskExecutor的典型用法代碼示例。如果您正苦於以下問題:TypeScript TaskExecutor類的具體用法?TypeScript TaskExecutor怎麽用?TypeScript TaskExecutor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TaskExecutor類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: upsertScalingPolicy

 public static upsertScalingPolicy(application: Application, command: IUpsertScalingPolicyCommand): IPromise<ITask> {
   command.type = command.type || 'upsertScalingPolicy';
   return TaskExecutor.executeTask({
     application,
     description: 'Upsert scaling policy ' + (command.name || command.serverGroupName),
     job: [command],
   });
 }
開發者ID:emjburns,項目名稱:deck,代碼行數:8,代碼來源:ScalingPolicyWriter.ts

示例2: stopServerGroup

  public stopServerGroup(serverGroup: IAppengineServerGroup, application: Application): ng.IPromise<ITask> {
    const job = this.buildJob(serverGroup, application, 'stopAppEngineServerGroup');

    const command: ITaskCommand = {
      job: [job],
      application,
      description: `Stop Server Group: ${serverGroup.name}`,
    };

    return TaskExecutor.executeTask(command);
  }
開發者ID:emjburns,項目名稱:deck,代碼行數:11,代碼來源:serverGroup.write.service.ts

示例3: deregisterInstancesFromTargetGroup

 public deregisterInstancesFromTargetGroup(
   instanceGroups: IMultiInstanceGroup[],
   application: Application,
   targetGroupNames: string[],
 ): IPromise<ITask> {
   const jobs = this.buildMultiInstanceJob(
     instanceGroups,
     'deregisterInstancesFromLoadBalancer',
   ) as IAmazonMultiInstanceJob[];
   jobs.forEach(job => (job.targetGroupNames = targetGroupNames));
   const descriptor = this.buildMultiInstanceDescriptor(jobs, 'Deregister', `from ${targetGroupNames.join(' and ')}`);
   return TaskExecutor.executeTask({
     job: jobs,
     application,
     description: descriptor,
   });
 }
開發者ID:mizzy,項目名稱:deck,代碼行數:17,代碼來源:amazon.instance.write.service.ts

示例4: registerInstancesWithTargetGroup

 public registerInstancesWithTargetGroup(instanceGroups: IMultiInstanceGroup[], application: Application, targetGroupNames: string[]) {
   const jobs = this.buildMultiInstanceJob(instanceGroups, 'registerInstancesWithLoadBalancer') as IAmazonMultiInstanceJob[];
   jobs.forEach((job) => job.targetGroupNames = targetGroupNames);
   const descriptor = this.buildMultiInstanceDescriptor(jobs, 'Register', `with ${targetGroupNames.join(' and ')}`);
   return this.taskExecutor.executeTask({
     job: jobs,
     application: application,
     description: descriptor,
   });
 }
開發者ID:jcwest,項目名稱:deck,代碼行數:10,代碼來源:amazon.instance.write.service.ts

示例5: registerInstanceWithTargetGroup

 public registerInstanceWithTargetGroup(instance: IAmazonInstance, application: Application, params: any = {}): IPromise<ITask> {
   params.type = 'registerInstancesWithLoadBalancer';
   params.instanceIds = [instance.id];
   params.targetGroupNames = instance.targetGroups;
   params.region = instance.region;
   params.credentials = instance.account;
   params.cloudProvider = instance.cloudProvider;
   return this.taskExecutor.executeTask({
     job: [params],
     application: application,
     description: `Register instance: ${instance.id}`
   });
 }
開發者ID:jcwest,項目名稱:deck,代碼行數:13,代碼來源:amazon.instance.write.service.ts

示例6: deleteScalingPolicy

 public deleteScalingPolicy(application: Application, serverGroup: IServerGroup, scalingPolicy: IScalingPolicy): IPromise<ITask> {
   return this.taskExecutor.executeTask({
     application,
     description: 'Delete scaling policy ' + scalingPolicy.policyName,
     job: [
       {
         type: 'deleteScalingPolicy',
         cloudProvider: 'aws',
         credentials: serverGroup.account,
         region: serverGroup.region,
         policyName: scalingPolicy.policyName,
         serverGroupName: serverGroup.name,
       }
     ]
   });
 }
開發者ID:jcwest,項目名稱:deck,代碼行數:16,代碼來源:scalingPolicy.write.service.ts


注:本文中的@spinnaker/core.TaskExecutor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。