deployment

package
v0.0.0-...-b359386 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

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

Deployment is a wrapper around service metadata for marking jobs as either performing a deployment or done deploying

func NewDeployment

func NewDeployment(service string) (*Deployment, error)

func (*Deployment) Close

func (d *Deployment) Close() error

func (*Deployment) Create

func (d *Deployment) Create(id string) error

Create starts a new deployment with a given ID

func (*Deployment) MarkDone

func (d *Deployment) MarkDone(addr string) error

MarkDone marks the addr as done in the service metadata

func (*Deployment) MarkPerforming

func (d *Deployment) MarkPerforming(addr string, timeout int) error

MarkPerforming marks the given address as performing in the service metadata, ensuring there is only one address marked as performing at any given time (waiting for a ServiceMeta event and retrying if there is already an address performing).

func (*Deployment) Wait

func (d *Deployment) Wait(id string, timeout time.Duration, log log15.Logger) error

Wait waits for an expected number of "done" addresses in the service metadata

type DeploymentMeta

type DeploymentMeta struct {
	ID     string                     `json:"id"`
	States map[string]DeploymentState `json:"states"`
}

func NewDeploymentMeta

func NewDeploymentMeta(id string) DeploymentMeta

type DeploymentState

type DeploymentState string
const (
	DeploymentStatePerforming DeploymentState = "performing"
	DeploymentStateDone       DeploymentState = "done"
)

Jump to

Keyboard shortcuts

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