Documentation ¶
Index ¶
Constants ¶
View Source
const ( // OnDemandPercentageLong is the name of a tag that can be defined on a // per-group level for overriding maintained on-demand capacity given as a // percentage of the group's running instances. OnDemandPercentageLong = "autospotting_on_demand_percentage" // OnDemandNumberLong is the name of a tag that can be defined on a // per-group level for overriding maintained on-demand capacity given as an // absolute number. OnDemandNumberLong = "autospotting_on_demand_number" // DefaultMinOnDemandValue stores the default on-demand capacity to be kept // running in a group managed by autospotting. DefaultMinOnDemandValue = 0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
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 }
Config contains a number of flags and static data storing the EC2 instance information.
Click to show internal directories.
Click to hide internal directories.