actions

package
v0.0.0-...-145e272 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaling

type AutoScaling struct {
	AsgAPI autoscalingiface.AutoScalingAPI
	Ec2Api ec2iface.EC2API
	EcsAPI ecsiface.ECSAPI
}

AutoScaling represents asg and ec2 api interfaces.

type Instance

type Instance struct {
	InstanceID   string
	InstanceArn  string
	ImageID      string
	RunningTasks int
	PendingTasks int
	Draining     bool
	Cluster      string
}

Instance retains status of each asg instance.

type MockReplacement

type MockReplacement struct {
	// contains filtered or unexported fields
}

MockReplacement mocks Replacement.

type Replacer

type Replacer struct {
	// contains filtered or unexported fields
}

Replacer defines replacement task.

func NewMockReplacer

func NewMockReplacer(
	ctx context.Context,
	region string,
	profile string) *Replacer

NewMockReplacer genetate new replacer object.

func NewReplacer

func NewReplacer(
	ctx context.Context,
	region string,
	profile string) *Replacer

NewReplacer genetate new replacer object.

func (*Replacer) Ami

func (r *Replacer) Ami(id string) (string, error)

Ami extracts imageID of current ASG from Launch Template.

func (*Replacer) RemoveAMIs

func (r *Replacer) RemoveAMIs(c *config.Config) error

RemoveAMIs removes obsolete AMIs

func (*Replacer) RemoveSnapShots

func (r *Replacer) RemoveSnapShots(c *config.Config) error

RemoveSnapShots removes obsolete snapshots.

func (*Replacer) ReplaceInstance

func (r *Replacer) ReplaceInstance(c *config.Config) error

ReplaceInstance replace ecs cluster instances with newest amis.

Jump to

Keyboard shortcuts

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