api

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const ECS_POLL_INTERVAL = 1 * time.Second

Variables

View Source
var ErrNoStacksFound = errors.New("No matching stacks found")

Functions

func CreateStack

func CreateStack(svc cfnInterface, name string, body string, ctx CreateStackContext) error

func DeleteStack

func DeleteStack(svc cfnInterface, name string) error

func ExposedPorts

func ExposedPorts(taskDef *ecs.TaskDefinition) map[string][]*ecs.PortMapping

func FindAllStacksForCluster

func FindAllStacksForCluster(svc cfnInterface, clusterName string) ([]*cloudformation.Stack, error)

func FindClusterStack

func FindClusterStack(svc cfnInterface, clusterName string) (*cloudformation.Stack, error)

func FindServiceStack

func FindServiceStack(svc cfnInterface, clusterName, taskFamily string) (*cloudformation.Stack, error)

func FindStacksByName

func FindStacksByName(svc cfnInterface, stackName string) (stacks []*cloudformation.Stack, err error)

func FindStacksByOutputs

func FindStacksByOutputs(svc cfnInterface, match map[string]string) ([]*cloudformation.Stack, error)

func FormatStackEvent

func FormatStackEvent(event *cloudformation.StackEvent) string

func GetStackOutputByKey

func GetStackOutputByKey(stack *cloudformation.Stack, key string) (string, bool)

func PollStackEventsUntil

func PollStackEventsUntil(svc cfnInterface, stackName string, terminalCondition EventChecker, f func(e *cloudformation.StackEvent)) error

func PollUntilCreated

func PollUntilCreated(svc cfnInterface, stackName string, f func(e *cloudformation.StackEvent)) error

func PollUntilDeleted

func PollUntilDeleted(svc cfnInterface, stackName string, f func(e *cloudformation.StackEvent)) error

func PollUntilTaskDeployed

func PollUntilTaskDeployed(svc ecsInterface, cluster string, service string, task string, f func(e *ecs.ServiceEvent)) error

func StackOutputMap

func StackOutputMap(stack *cloudformation.Stack) stackOutputMap

func StackOutputs

func StackOutputs(svc cfnInterface, name string) (stackOutputMap, error)

func UpdateContainerImages

func UpdateContainerImages(defs []*ecs.ContainerDefinition, images map[string]string) error

Types

type CreateStackContext

type CreateStackContext struct {
	Params          map[string]string
	DisableRollback bool
}

type EventChecker

type EventChecker func(stackName string, ev *cloudformation.StackEvent) (bool, error)

type NetworkOutputs

type NetworkOutputs struct {
	StackName      string
	VpcId          string
	Subnet0Public  string
	Subnet1Public  string
	Subnet2Private string
	Subnet3Private string
}

func FindNetworkStack

func FindNetworkStack(svc cfnInterface, clusterName string) (NetworkOutputs, error)

type Services

type Services struct {
	Cloudformation cfnInterface
	ECS            ecsInterface
	Logs           cloudwatchLogsInterface
}
var DefaultServices Services

Jump to

Keyboard shortcuts

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