deployment

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package deployment provides types and helpers for cloud deployments.

Index

Constants

View Source
const (
	// ErrInvalidStatus represents an invalid deployment status error.
	ErrInvalidStatus errors.Kind = "invalid deployment status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status uint8

Status of a stack or deployment

const (
	OK       Status = 1 << iota // OK status is used when the stack ran successfully.
	Pending                     // Pending is a temporary status set when the deployment is about to commence.
	Running                     // Running is a temporary status as part of an still ongoing deployment.
	Failed                      // Failed status indicates the deployment of the stack failed.
	Canceled                    // Canceled indicates the deployment of the stack was canceled.

)

func NewStatus

func NewStatus(str string) (Status, error)

NewStatus creates a new stack status from a string.

func (Status) IsFinalState added in v0.4.4

func (s Status) IsFinalState() bool

IsFinalState tells if the status is a final deployment state. The deployment state is a finite state machine where final states can be only OK, Failed or Canceled.

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaller interface.

func (Status) String

func (s Status) String() string

String representation of the status.

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals stack status from JSONs.

func (Status) Validate

func (s Status) Validate() error

Validate the status.

Jump to

Keyboard shortcuts

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