services

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServices

func NewServices(profile string) (EC2Service, ECSService, ASGService)

Types

type ASGService

type ASGService interface {
	DescribeAutoScalingGroups(name string) (int64, error)
	UpdateDesiredCapacity(name string, newCapacity int64) error
}

type ClusterInstance

type ClusterInstance struct {
	Cluster              string
	InstanceID           string
	Status               string
	ContainerInstanceArn string
}

type CustomAWSWaiterConfig

type CustomAWSWaiterConfig struct {
	MaxAttempts int
	Delay       int
}

type DescribeAutoScalingGroupsOutput

type DescribeAutoScalingGroupsOutput struct {
	DesiredCapacity int64
}

type EC2Service

type EC2Service interface {
	TerinateInstance(instance ClusterInstance) error

	GetImageID(instance ClusterInstance) (string, error)
	DescribeImages(id string) (MachineImage, error)
}

type ECSService

type ECSService interface {
	ListContainerInstances(cluster string) ([]ClusterInstance, error)
	DrainContainerInstances(instance ClusterInstance) error
	DeregisterContainerInstance(instance ClusterInstance) error
	UpdateECSServiceByForce(cluster string) error
	WaitUntilContainerInstanceDrained(instance ClusterInstance, config CustomAWSWaiterConfig) error
	WaitUntilNewInstanceRegistered(cluster string, desire int, config CustomAWSWaiterConfig) error
}

type MachineImage added in v0.2.0

type MachineImage struct {
	Architecture    string
	ImageID         string
	PlatformDetails string
	Description     string
	Name            string
}

Jump to

Keyboard shortcuts

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