-
Notifications
You must be signed in to change notification settings - Fork 1
/
domain.go
executable file
·50 lines (44 loc) · 1.38 KB
/
domain.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package ead
import (
"log"
"time"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
ecsTypes "github.com/aws/aws-sdk-go-v2/service/ecs/types"
)
const (
DefaultAMIFilter = "amzn2-ami-ecs-hvm-*-x86_64-ebs"
DefaultPollingTimeout = 15 * time.Minute
DefaultPollingInterval = 5 * time.Second
DefaultLaunchTemplateLimit = 5
DefaultTimestampLayout = "20060102T150405"
MinimumIntervalsForStable = 6
TagNameASG = "ecs-ami-deploy-asg"
TagNameTerminate = "ecs-ami-deploy-terminate"
Version = "0.0.0"
)
type ClusterMeta struct {
Cluster ecsTypes.Cluster
Image ec2types.Image
}
type Config struct {
AMIFilter string
Cluster string
ForceReplacement bool
LaunchTemplateLimit int
LaunchTemplateNamePrefix string
Logger *log.Logger
PollingInterval time.Duration
PollingTimeout time.Duration
TimestampLayout string
}
var DefaultConfig = Config{
AMIFilter: DefaultAMIFilter,
Cluster: "",
ForceReplacement: false,
LaunchTemplateLimit: DefaultLaunchTemplateLimit,
LaunchTemplateNamePrefix: "",
Logger: nil,
PollingInterval: DefaultPollingInterval,
PollingTimeout: DefaultPollingTimeout,
TimestampLayout: DefaultTimestampLayout,
}