Documentation
¶
Index ¶
- Variables
- func DescribeEcsServicesForArns(awsSess *session.Session, serviceArns []*string, cluster string) ([]*ecs.Service, error)
- func DetachAndReplaceAsgInstances(awsSess *session.Session, asgName string, instancesToTerminate []*string)
- func GetAsg(awsSess *session.Session, asgName string) *autoscaling.Group
- func GetAsgNameForEcsCluster(awsSess *session.Session, cluster string) string
- func GetAsgServerCount(awsSess *session.Session, asgName string) (desired int64, min int64, max int64)
- func GetInstanceIDsForEcsCluster(awsSess *session.Session, clusterName string) []*string
- func GetInstanceIPsForEcsCluster(awsSess *session.Session, clusterName string) []string
- func GetInstanceListForAsg(awsSess *session.Session, asgName string) []*string
- func GetInstanceListForEcsCluster(awsSess *session.Session, clusterName string) []*ecs.ContainerInstance
- func GetInstanceTypeForAsg(awsSess *session.Session, asgName string) string
- func GetLargestDesiredCountFromEcsServices(ecsServices []*ecs.Service) int64
- func GetMemoryCpuNeededForEcsServices(awsSess *session.Session, ecsServices []*ecs.Service) (int64, int64)
- func GetPendingEcsTasksCount(awsSess *session.Session, cluster string) int64
- func HowManyServersNeededForAsg(serverType string, memory, cpu int64) int64
- func LambdaInvoke(awsSess *session.Session, functionName, payload string) (*lambda.InvokeOutput, error)
- func ListServicesForEcsCluster(awsSess *session.Session, cluster string) []*ecs.Service
- func RightSizeAsgForEcsCluster(awsSess *session.Session, cluster string, atLeastServiceDesiredCount bool) error
- func UpdateAsgServerCount(awsSess *session.Session, asgName string, serverCount int64) error
- type InstanceType
Constants ¶
This section is empty.
Variables ¶
View Source
var InstanceTypes = map[string]InstanceType{ "t2.nano": { CPUUnits: 1 * SingleCPUUnits, MemoryMb: 512, }, "t2.micro": { CPUUnits: 1 * SingleCPUUnits, MemoryMb: 1 * MbInGb, }, "t2.small": { CPUUnits: 1 * SingleCPUUnits, MemoryMb: 2 * MbInGb, }, "t2.medium": { CPUUnits: 2 * SingleCPUUnits, MemoryMb: 4 * MbInGb, }, "t2.large": { CPUUnits: 2 * SingleCPUUnits, MemoryMb: 8 * MbInGb, }, "t2.xlarge": { CPUUnits: 4 * SingleCPUUnits, MemoryMb: 16 * MbInGb, }, "t2.2xlarge": { CPUUnits: 8 * SingleCPUUnits, MemoryMb: 32 * MbInGb, }, }
View Source
var MbInGb int64 = 985 // only 985 out of 1024 is available for use due to ECS agent
View Source
var SingleCPUUnits int64 = 1024
Functions ¶
func GetAsgNameForEcsCluster ¶
func GetAsgServerCount ¶
func GetInstanceListForAsg ¶
func GetInstanceListForEcsCluster ¶
func GetInstanceListForEcsCluster(awsSess *session.Session, clusterName string) []*ecs.ContainerInstance
func GetInstanceTypeForAsg ¶
func GetPendingEcsTasksCount ¶
func LambdaInvoke ¶
Types ¶
type InstanceType ¶
Click to show internal directories.
Click to hide internal directories.