inspector

package
v0.0.0-...-3f1c2bf Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

type Inspector struct {
	AWSClient     aws.Client
	StatusSummary StatusSummary
	UpdateFields  UpdateFields
}

func New

func New(region string) Inspector

New creates new Inspector

func (Inspector) GenerateStack

func (i Inspector) GenerateStack(region string, group *autoscaling.Group) schemas.Stack

GenerateStack generates stack configuration for update

func (Inspector) GetLaunchTemplateInformation

func (i Inspector) GetLaunchTemplateInformation(ltID string) (*ec2.LaunchTemplateVersion, error)

GetLaunchTemplateInformation retrieves single launch template information

func (Inspector) GetSecurityGroupsInformation

func (i Inspector) GetSecurityGroupsInformation(sgIds []*string) ([]*ec2.SecurityGroup, error)

GetSecurityGroupsInformation retrieves security groups' information

func (Inspector) GetStackInformation

func (i Inspector) GetStackInformation(asgName string) (*autoscaling.Group, error)

func (Inspector) GetStacks

func (i Inspector) GetStacks(application string) ([]string, error)

GetStacks returns stacks from application prefix

func (Inspector) Print

func (i Inspector) Print() error

Print prints the current status of deployment

func (Inspector) SelectStack

func (i Inspector) SelectStack(application string) (string, error)

SelectStack selects a stack

func (Inspector) SetStatusSummary

func (i Inspector) SetStatusSummary(asg *autoscaling.Group, sgs []*ec2.SecurityGroup) StatusSummary

SetStatusSummary creates status summary structure

func (Inspector) Update

func (i Inspector) Update() error

Update will update autoscaling group configuration

type SecurityGroup

type SecurityGroup struct {
	ID                  string
	IPProtocol          string
	FromPort            string
	ToPort              string
	IPRange             string
	Description         string
	SourceSecurityGroup string
}

type StatusSummary

type StatusSummary struct {
	Name         string
	Capacity     schemas.Capacity
	CreatedTime  time.Time
	InstanceType map[string]int64
	Tags         []string
	IngressRules []SecurityGroup
	EgressRules  []SecurityGroup
}

type UpdateFields

type UpdateFields struct {
	AutoscalingName string
	Capacity        schemas.Capacity
}

Jump to

Keyboard shortcuts

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