Documentation
¶
Index ¶
- Variables
- func CheckIntervalDuration(d time.Duration)
- func TimeoutDuration(d time.Duration)
- type Result
- func CheckDeployed(services []*config.Service) []Result
- func CheckDrained(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result
- func Deploy(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result
- func Rollback(ctx context.Context, services []*config.Service, ecsClient awsecs.ECSClient) []Result
- type ScheduledTaskResult
Constants ¶
This section is empty.
Variables ¶
var ErrNoDeployCheckURL = errors.New("deploy: service has no URL to check deployment")
ErrNoDeployCheckURL is returned by CheckDeployed if the service has no URL set.
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
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
TimeoutDuration sets the duration to wait for CheckDeployed and CheckDrained before timing out. Default is 10 minutes.
Types ¶
type Result ¶
Result represents the result of a deploy action. If the action failed err will be non-nil.
func CheckDeployed ¶
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.
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.