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


TypeScript deploymentStrategy.registry.DeploymentStrategyRegistry類代碼示例

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


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

示例1: require

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Rolling Red/Black (Experimental)',
  description: `Creates a new version of this server group, then incrementally resizes the new server group while disabling the same percentage in the previous server group.`,
  key: 'rollingredblack',
  providerRestricted: true,
  additionalFields: ['targetPercentages'],
  additionalFieldsTemplateUrl: require('./additionalFields.html'),
  initializationMethod: command => {
    if (!command.targetPercentages) {
      command.targetPercentages = [50, 100];
    }

    if (!command.pipelineBeforeCleanup) {
      command.beforeCleanupPipeline = {
        application: command.application,
      };
    }
  },
});
開發者ID:mizzy,項目名稱:deck,代碼行數:21,代碼來源:rollingredblack.strategy.ts

示例2: require

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Red/Black',
  description: 'Disables <i>all</i> previous server groups in the cluster as soon as new server group passes health checks',
  key: 'redblack',
  providerRestricted: true,
  additionalFields: ['scaleDown', 'maxRemainingAsgs'],
  additionalFieldsTemplateUrl: require('./additionalFields.html'),
});
開發者ID:jcwest,項目名稱:deck,代碼行數:10,代碼來源:redblack.strategy.ts

示例3:

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Highlander',
  description: 'Destroys <i>all</i> previous server groups in the cluster as soon as new server group passes health checks',
  key: 'highlander',
});
開發者ID:jcwest,項目名稱:deck,代碼行數:7,代碼來源:highlander.strategy.ts

示例4:

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
  label: 'None',
  description: 'Creates the next server group with no impact on existing server groups',
  key: '',
  providerRestricted: false,
});
開發者ID:emjburns,項目名稱:deck,代碼行數:8,代碼來源:none.strategy.ts

示例5:

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';
import { AdditionalFields } from './AdditionalFields';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Custom',
  description: 'Runs a custom deployment strategy',
  key: 'custom',
  additionalFields: ['pipelineParameters', 'strategyApplication', 'strategyPipeline'],
  AdditionalFieldsComponent: AdditionalFields,
});
開發者ID:emjburns,項目名稱:deck,代碼行數:10,代碼來源:custom.strategy.ts

示例6:

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

import { AdditionalFields } from './AdditionalFields';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Rolling Red/Black (Experimental)',
  description: `Creates a new version of this server group, then incrementally resizes the new server group while disabling the same percentage in the previous server group.`,
  key: 'rollingredblack',
  providerRestricted: true,
  additionalFields: ['targetPercentages', 'scaleDown'],
  AdditionalFieldsComponent: AdditionalFields,
  initializationMethod: command => {
    if (!command.targetPercentages) {
      command.targetPercentages = [50, 100];
    }
    command.delayBeforeDisableSec = command.delayBeforeDisableSec || 0;

    if (!command.pipelineBeforeCleanup) {
      command.pipelineBeforeCleanup = {
        application: command.application,
      };
    }
  },
});
開發者ID:emjburns,項目名稱:deck,代碼行數:24,代碼來源:rollingredblack.strategy.ts

示例7: defaultsDeep

export interface IRedBlackCommand extends IServerGroupCommand {
  maxRemainingAsgs: number;
  delayBeforeDisableSec: number;
  delayBeforeScaleDownSec: number;
  rollback: {
    onFailure: boolean;
  };
  scaleDown: boolean;
}

DeploymentStrategyRegistry.registerStrategy({
  label: 'Red/Black',
  description:
    'Disables <i>all</i> previous server groups in the cluster as soon as new server group passes health checks',
  key: 'redblack',
  providerRestricted: true,
  additionalFields: ['scaleDown', 'maxRemainingAsgs'],
  AdditionalFieldsComponent: AdditionalFields,
  initializationMethod: (command: IRedBlackCommand) => {
    defaultsDeep(command, {
      rollback: {
        onFailure: false,
      },
      maxRemainingAsgs: !command.strategy ? 2 : command.maxRemainingAsgs,
      delayBeforeDisableSec: 0,
      delayBeforeScaleDownSec: 0,
      scaleDown: false,
    });
  },
});
開發者ID:emjburns,項目名稱:deck,代碼行數:30,代碼來源:redblack.strategy.ts

示例8: require

import { DeploymentStrategyRegistry } from 'core/deploymentStrategy/deploymentStrategy.registry';

DeploymentStrategyRegistry.registerStrategy({
  label: 'Custom',
  description: 'Runs a custom deployment strategy',
  key: 'custom',
  additionalFields: ['pipelineParameters', 'strategyApplication', 'strategyPipeline'],
  additionalFieldsTemplateUrl: require('./additionalFields.html'),
});
開發者ID:jcwest,項目名稱:deck,代碼行數:9,代碼來源:custom.strategy.ts


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