deployer

package
v0.0.0-...-efe39f3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Info    = "info"
	Success = "warning"
	Error   = "error"
)
View Source
const DefaultPollInterval = 5 * time.Second

Variables

This section is empty.

Functions

func UpdateImageTag

func UpdateImageTag(image, tag string) string

Types

type Current

type Current struct {
	Desired int `json:"desired"`
	Running int `json:"running"`
	Pending int `json:"pending"`
}

type DeployStatus

type DeployStatus struct {
	Stage          Stage    `json:"stage,omitempty"`
	Message        *Message `json:"message,omitempty"`
	Current        Current  `json:"current,omitempty"`
	Previous       Previous `json:"previous,omitempty"`
	Done           bool     `json:"done"`
	Service        string   `json:"service,omitempty"`
	Cluster        string   `json:"cluster,omitempty"`
	TaskDefinition string   `json:"task_definition,omitempty"`
}

type Deployer

type Deployer struct {

	// How frequently to poll for deploy status.
	PollInterval time.Duration
	// contains filtered or unexported fields
}

func NewDeployer

func NewDeployer(svc *ecs.ECS, cw *cloudwatchevents.CloudWatchEvents, reporter Reporter) *Deployer

func (*Deployer) Deploy

func (d *Deployer) Deploy(ctx context.Context, r *Request) error

func (*Deployer) OverrideImages

func (d *Deployer) OverrideImages(td *ecs.TaskDefinition, r *Request) error

type Message

type Message struct {
	Type MessageType `json:"type,omitempty"`
	Text string      `json:"text,omitempty"`
}

type MessageType

type MessageType string

type Previous

type Previous struct {
	Running int `json:"running"`
	Total   int `json:"total"`
}

type Reporter

type Reporter interface {
	Report(status *DeployStatus)
	Wait(ctx context.Context) error
}

type Request

type Request struct {
	Cluster            string
	Service            string
	TaskDefinition     io.Reader
	Tags               []string
	DesiredCount       int64
	MaxPercent         int64
	MinPercent         int64
	DetectFailures     bool
	ScheduleExpression string
	IsScheduledTask    bool
	ScheduleTargetID   string
	// contains filtered or unexported fields
}

type ScheduledTask

type ScheduledTask struct {
	// contains filtered or unexported fields
}

type Stage

type Stage int
const (
	StageCreateTaskDefinition Stage = iota
	StageUpdateService
	StageWaitForDeploy
	StageCompleted
	StageFailed
)

Jump to

Keyboard shortcuts

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