aws

package
v0.0.0-...-4750422 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScalingGroup

type AutoScalingGroup struct {
	AutoScalingGroupName  string
	DesiredCapacity       int64
	LaunchTemplateId      string
	LaunchTemplateVersion int64
	MaxSize               int64
	CurrentAmi            string
	Instances             []*Instance
	NewInstances          []*Instance
}

type AutoScalingGroups

type AutoScalingGroups struct {
	Groups []*AutoScalingGroup
}

type AwsClient

type AwsClient struct {
	Session     *session.Session
	Config      *aws.Config
	EC2         ec2iface.EC2API
	AutoScaling autoscalingiface.AutoScalingAPI
	SSM         ssmiface.SSMAPI
}

func NewAwsClient

func NewAwsClient(roleArn string) (*AwsClient, error)

func (*AwsClient) DetachNodeFromASG

func (c *AwsClient) DetachNodeFromASG(asg *AutoScalingGroup, instance *Instance) (*autoscaling.Activity, error)

func (*AwsClient) GetAutoScalingGroups

func (c *AwsClient) GetAutoScalingGroups() (*AutoScalingGroups, error)

func (*AwsClient) GetLatestEKSAmi

func (c *AwsClient) GetLatestEKSAmi(eksMajor string, eksMinor string) (string, error)

func (*AwsClient) IdentifyNewInstance

func (c *AwsClient) IdentifyNewInstance(asg *AutoScalingGroup) (*Instance, error)

func (*AwsClient) ReplaceNodeInASG

func (c *AwsClient) ReplaceNodeInASG(asg *AutoScalingGroup, instance *Instance) (*Instance, error)

func (*AwsClient) TerminateInstance

func (c *AwsClient) TerminateInstance(instanceId string) error

func (*AwsClient) WaitForASGScaleUp

func (c *AwsClient) WaitForASGScaleUp(asg *AutoScalingGroup, activity *autoscaling.Activity) (*Instance, error)

type Instance

type Instance struct {
	InstanceId             string
	InstancePrivateDnsName string
	LaunchTemplateVersion  int64
	AvailabilityZone       string
}

Jump to

Keyboard shortcuts

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