deployment

package
v0.0.0-...-8488f5b Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2016 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSkipRollback

func IsSkipRollback(err error) bool

func JobHandler

func JobHandler(db *postgres.DB, client controller.Client, logger log15.Logger) func(*que.Job) error

Types

type DeployJob

type DeployJob struct {
	*ct.Deployment
	// contains filtered or unexported fields
}

func (*DeployJob) JobEventErr

func (d *DeployJob) JobEventErr(err error)

JobEventErr sends the given error on job event channels for all releases.

It does not close the channels because there are multiple publishers which could break (i.e. controller job events and discoverd service events), but everything will ultimately be closed when this error is received and the deferred stream closes kick in.

func (*DeployJob) Perform

func (d *DeployJob) Perform() error

func (*DeployJob) ReleaseJobEvents

func (d *DeployJob) ReleaseJobEvents(releaseID string) chan *JobEvent

ReleaseJobEvents lazily creates and returns a channel of job events for the given release

type ErrSkipRollback

type ErrSkipRollback struct {
	Err string
}

func (ErrSkipRollback) Error

func (e ErrSkipRollback) Error() string

type JobEvent

type JobEvent struct {
	Type           JobEventType
	DiscoverdEvent *discoverd.Event
	JobEvent       *ct.Job
	Error          error
}

JobEvent is a wrapper around either a discoverd service event, a controller job event or a stream error, and helps the deploy to have a separate channel per release when waiting for job events

type JobEventType

type JobEventType int
const (
	JobEventTypeDiscoverd JobEventType = iota
	JobEventTypeController
	JobEventTypeError
)

type UnknownStrategyError

type UnknownStrategyError struct {
	Strategy string
}

func (UnknownStrategyError) Error

func (e UnknownStrategyError) Error() string

type WaitJobsFn

type WaitJobsFn func(releaseID string, expected ct.JobEvents, log log15.Logger) error

Jump to

Keyboard shortcuts

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