status

package
v0.0.0-...-ffd2651 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L

type L []T

L is a list of T

func List

func List(l ...T) L

func (L) Add

func (t L) Add(s ...T) L

func (L) Has

func (t L) Has(s T) bool

func (L) String

func (t L) String() string

type T

type T int

T representing a Resource, Object Instance or Object status

const (
	// NotApplicable means Not Applicable
	NotApplicable T = 1 << iota
	// Up means Configured or Active
	Up
	// Down means Unconfigured or Inactive
	Down
	// Warn means Partially configured or active
	Warn
	// StandbyUp means Instance with standby resources Configured or Active and no other resources
	StandbyUp
	// StandbyDown means Instance with standby resources Unconfigured or Inactive and no other resources
	StandbyDown
	// StandbyUpWithUp means Instance with standby resources Configured or Active and other resources Up
	StandbyUpWithUp
	// StandbyUpWithDown means Instance with standby resources Configured or Active and other resources Down
	StandbyUpWithDown
)
const (
	// Undef means Undefined
	Undef T = 0
)

func Parse

func Parse(s string) T

func (*T) Add

func (t *T) Add(o T)

Add merges two states and returns the aggregate state.

func (T) Is

func (t T) Is(l ...T) bool

func (T) MarshalText

func (t T) MarshalText() ([]byte, error)

MarshalText marshals the enum as a quoted json string

func (T) String

func (t T) String() string

func (*T) UnmarshalText

func (t *T) UnmarshalText(b []byte) error

UnmarshalText unmashals a quoted json string to the enum value

Jump to

Keyboard shortcuts

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