/
scale.go
22 lines (20 loc) · 887 Bytes
/
scale.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ecspresso
type ScaleOption struct {
DryRun *bool `help:"dry run" default:"false"`
DesiredCount *int32 `name:"tasks" help:"desired count of tasks" default:"-1"`
NoWait *bool `help:"exit ecspresso immediately after just deployed without waiting for service stable" default:"false"`
SuspendAutoScaling *bool `help:"suspend application auto-scaling attached with the ECS service"`
ResumeAutoScaling *bool `help:"resume application auto-scaling attached with the ECS service"`
}
func (o *ScaleOption) DeployOption() DeployOption {
return DeployOption{
DesiredCount: o.DesiredCount,
DryRun: o.DryRun,
SkipTaskDefinition: ptr(true),
ForceNewDeployment: ptr(false),
NoWait: o.NoWait,
RollbackEvents: ptr(""),
UpdateService: ptr(false),
LatestTaskDefinition: ptr(false),
}
}