status

package
v0.0.4-rc0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterName

func GetClusterName() (string, error)

GetClusterName returns the cluster name associated with the current context in ~/.kube/config

func Override added in v0.0.4

func Override(handler StatusHandler) override.Override

func WithStatusHandler added in v0.0.4

func WithStatusHandler(handler StatusHandler, fun func() error) error

Types

type ClusterStatus

type ClusterStatus int
const (
	Unknown ClusterStatus = iota
	Unmodified
	FluxInstalled
	WeGOInstalled
)

func GetClusterStatus

func GetClusterStatus() ClusterStatus

GetClusterStatus retrieves the current wego status of the cluster. That is, it returns one of: Unknown, Unmodified, FluxInstalled, or WeGOInstalled depending on whether the cluster: - refuses to be queried - has nothing installed - has flux installed - has wego installed

func (ClusterStatus) String

func (cs ClusterStatus) String() string

Function to translate ClusterStatus to a string

type StatusHandler added in v0.0.4

type StatusHandler interface {
	GetClusterName() (string, error)
	GetClusterStatus() ClusterStatus
}

Status shim

Jump to

Keyboard shortcuts

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