autoscaling

package
v0.0.0-...-9f55c91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package autoscaling simplifies listing and updating of EC2 Auto Scaling groups

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// SimilarityConfig configures EC2 similarity matching algorithm.
	SimilarityConfig ec2.Config
	// OnDemandBaseCapacity the minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances.
	// This base portion is provisioned first as your group scales. Defaults to 0 if not specified.
	// Set the value of OnDemandBaseCapacity in terms of the number of capacity units (VCPU), and not the number of instances.
	OnDemandBaseCapacity int64
	// OnDemandPercentageAboveBaseCapacity controls the percentages of On-Demand Instances and Spot Instances for your additional capacity
	// beyond OnDemandBaseCapacity. Expressed as a number (for example, 20 specifies 20% On-Demand Instances, 80% Spot Instances).
	// Defaults to 100 if not specified. If set to 100, only On-Demand Instances are provisioned.
	OnDemandPercentageAboveBaseCapacity int64
}

A Config is used for update configuration tuning

type Lister

type Lister interface {
	List(ctx context.Context, tags map[string]string) ([]*autoscaling.Group, error)
}

Lister interface contains methods to list EC2 Auto Scaling groups

func NewLister

func NewLister(role sts.AssumeRoleInRegion) Lister

NewLister creates a new Lister

type Updater

type Updater interface {
	CreateUpdateInput(context.Context, *autoscaling.Group) (*autoscaling.UpdateAutoScalingGroupInput, error)
	Update(context.Context, *autoscaling.Group) error
}

Updater interface contains methods for updating EC2 Auto Scaling groups

func NewUpdater

func NewUpdater(role sts.AssumeRoleInRegion, config Config) Updater

NewUpdater create new Updater

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL