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" // ErrInvalidFilterStatus represents an invalid deployment status filter error. ErrInvalidFilterStatus errors.Kind = "invalid filter deployment status" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterStatus ¶ added in v0.9.1
type FilterStatus Status
FilterStatus represents a filter for deployment statuses.
const ( // UnhealthyFilter status is used for filtering not OK deployment status. UnhealthyFilter FilterStatus = FilterStatus(^OK) // assumes only 1 status is healthy // HealthyFilter status is used for filtering healthy statuses. Just [OK] for now. HealthyFilter FilterStatus = FilterStatus(OK) // AllFilter filters for any stacks statuses. AllFilter FilterStatus = HealthyFilter | UnhealthyFilter // NoFilter disables the filtering for statuses. NoFilter FilterStatus = 0 )
func NewStatusFilter ¶ added in v0.9.1
func NewStatusFilter(str string) (FilterStatus, error)
NewStatusFilter creates a new filter for deployment statuses.
func (FilterStatus) Is ¶ added in v0.9.1
func (f FilterStatus) Is(status Status) bool
Is tells if the filter matches the provided status.
func (FilterStatus) String ¶ added in v0.9.1
func (f FilterStatus) String() string
type Status ¶
type Status uint8
Status of a 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. Unrecognized // Unrecognized indicates any deployment status returned from TMC but not recognized by this client version. )
func (Status) Is ¶ added in v0.9.1
func (s Status) Is(filter FilterStatus) bool
Is tells if status matches the provided filter.
func (Status) IsFinalState ¶ added in v0.4.4
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 ¶
MarshalJSON implements the Marshaller interface.
func (*Status) UnmarshalJSON ¶
UnmarshalJSON unmarshals stack status from JSONs.
Click to show internal directories.
Click to hide internal directories.