forked from LeanerCloud/AutoSpotting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
33 lines (25 loc) · 799 Bytes
/
config.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
package autospotting
import (
"io"
"time"
"github.com/cristim/ec2-instances-info"
)
// Config contains a number of flags and static data storing the EC2 instance
// information.
type Config struct {
// Static data fetched from ec2instances.info
InstanceData *ec2instancesinfo.InstanceData
// Logging
LogFile io.Writer
LogFlag int
// The region where the Lambda function is deployed
MainRegion string
MinOnDemandNumber int64
MinOnDemandPercentage float64
Regions string
AllowedInstanceTypes string
// This is only here for tests, where we want to be able to somehow mock
// time.Sleep without actually sleeping. While testing it defaults to 0 (which won't sleep at all), in
// real-world usage it's expected to be set to 1
SleepMultiplier time.Duration
}