A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/terramate-io/terramate@v0.14.4/cloud/api/drift below:

drift package - github.com/terramate-io/terramate/cloud/api/drift - Go Packages

Overview

Package drift provides types and helpers for cloud drifts.

Index Constants View Source
const (
	// ErrInvalidStatus represents an invalid drift status error.
	ErrInvalidStatus errors.Kind = "invalid drift status"
	// ErrInvalidFilterStatus represents an invalid drift status filter error.
	ErrInvalidFilterStatus errors.Kind = "invalid drift stack filter"
)
Variables

This section is empty.

Functions

This section is empty.

Types type FilterStatus
type FilterStatus Status

FilterStatus represents a filter for drift statuses.

const (
	// UnhealthyFilter status is used for filtering not OK drift status.
	UnhealthyFilter FilterStatus = FilterStatus(^OK)
	// HealthyFilter status is used for filtering for healthy statuses. Just [OK] for now.
	HealthyFilter FilterStatus = FilterStatus(OK)
	// NoFilter disables the filtering for statuses.
	NoFilter FilterStatus = 0
)
func NewStatusFilter
func NewStatusFilter(str string) (FilterStatus, error)

NewStatusFilter creates a new filter for drift statuses.

func (FilterStatus) Is
func (f FilterStatus) Is(status Status) bool

Is tells if the filter matches the provided status.

func (FilterStatus) String
func (f FilterStatus) String() string
type Status
type Status uint8

Status of a drift.

const (
	// OK status is used when the stack is not drifted.
	OK Status = 1 << iota
	// Unknown indicates the drift detection was not executed yet.
	Unknown
	// Drifted status indicates the stack is drifted.
	Drifted
	// Failed status indicates the drift detection of the stack failed.
	Failed
	// Unrecognized indicates any drift status returned from TMC but not
	// recognized by this client version.
	Unrecognized
)
func NewStatus
func NewStatus(str string) Status

NewStatus creates a new stack drift status from a string.

func (Status) Is
func (s Status) Is(filter FilterStatus) bool

Is tells if status matches the provided filter.

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 drift status from JSONs.

func (Status) Validate
func (s Status) Validate() error

Validate the status.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4