deploy

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDeployCheckURL = errors.New("deploy: service has no URL to check deployment")

ErrNoDeployCheckURL is returned by CheckDeployed if the service has no URL set.

View Source
var ErrTimedOut = errors.New("deploy: timed out while checking for event")

ErrTimedOut represents the fact that a timeout occurred while waiting for a service to deploy or drain.

Functions

func CheckIntervalDuration added in v0.0.4

func CheckIntervalDuration(d time.Duration)

CheckIntervalDuration sets the duration of how frequently to check if a service has deployed or drained. Default is 15 seconds.

func TimeoutDuration added in v0.0.4

func TimeoutDuration(d time.Duration)

TimeoutDuration sets the duration to wait for CheckDeployed and CheckDrained before timing out. Default is 10 minutes.

Types

type Result

type Result struct {
	Service *config.Service
	Err     error
}

Result represents the result of a deploy action. If the action failed err will be non-nil.

func CheckDeployed

func CheckDeployed(services []*config.Service) []Result

CheckDeployed keeps pinging the services until it sees the new version has been deployed or it times out. If a service timed out Result.err will be ErrTimedOut.

func CheckDrained

func CheckDrained(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result

CheckDrained keeps checking the services until it sees all old versions are gone or it times out. If a service timed out Result.err will be ErrTimedOut.

func Deploy

func Deploy(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result

Deploy will deploy the given services to AWS ECS.

func Rollback

func Rollback(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result

type ScheduledTaskResult added in v0.0.5

type ScheduledTaskResult struct {
	Task *config.ScheduledTask
	Err  error
}

ScheduledTaskResult represents the result of a scheduled task action. If the action failed err will be non-nil.

func RollbackScheduledTasks added in v0.0.5

func RollbackScheduledTasks(ctx context.Context, tasks []*config.ScheduledTask, ebClient awsecs.EBClient, ecsClient awsecs.ECSClient) []ScheduledTaskResult

RollbackScheduledTasks will change the ECS scheduled tasks to use the previous version of the service.

func UpdateScheduledTasks added in v0.0.5

func UpdateScheduledTasks(ctx context.Context, tasks []*config.ScheduledTask, ebClient awsecs.EBClient, ecsClient awsecs.ECSClient) []ScheduledTaskResult

UpdateScheduledTasks will update the ECS scheduled tasks to use the new version of the service.

Jump to

Keyboard shortcuts

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