status

package
v3.7.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultStatusFile = "status.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionStatus

type ConditionStatus struct {
	Ready  bool
	Reason string
}

type Status

type Status struct {
	Readiness map[string]ConditionStatus
	// contains filtered or unexported fields
}

func New

func New(file string) *Status

func ReadStatusFile

func ReadStatusFile(file string) (*Status, error)

ReadStatusFile reads in the status file as written by WriteStatus.

func (*Status) GetNotReadyConditions

func (s *Status) GetNotReadyConditions() string

GetNotReadyConditions cycles through all readiness keys and for any that are not ready the reasons are combined and returned. The output format is '<reason 1>; <reason 2>'.

func (*Status) GetReadiness

func (s *Status) GetReadiness() bool

GetReadiness checks all readiness keys and returns true if all are ready. If there are no readiness conditions then it has not been initialized and is considered not ready.

func (*Status) GetReady

func (s *Status) GetReady(key string) bool

GetReady check the status of the specified ready key, if the key has never been set then it is considered not ready (false).

func (*Status) SetReady

func (s *Status) SetReady(key string, ready bool, reason string)

SetReady sets the status of one ready key and the reason associated with that status.

Jump to

Keyboard shortcuts

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