statuschecker

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDStore

type CRDStore interface {
	Get(resource schema.GroupKind) (*apiext_v1b1.CustomResourceDefinition, error)
}

CRDStore gets a CRD definition for a Group and Kind of the resource (CRD instance). Returns nil if CRD definition was not found.

type Checker

type Checker struct {
	Store      CRDStore
	KnownTypes map[schema.GroupKind]ObjectStatusChecker
}

func New

func New(store CRDStore, kts ...map[schema.GroupKind]ObjectStatusChecker) (*Checker, error)

func (*Checker) CheckStatus

func (c *Checker) CheckStatus(obj *unstructured.Unstructured) ObjectStatusResult

type Interface

type Interface interface {
	CheckStatus(*unstructured.Unstructured) ObjectStatusResult
}

type ObjectStatusChecker

type ObjectStatusChecker func(runtime.Object) ObjectStatusResult

ObjectStatusChecker checks object's status. Function is responsible for handling different versions of objects by itself.

type ObjectStatusError

type ObjectStatusError struct {
	ExternalError  bool
	RetriableError bool
	Error          error
}

func (ObjectStatusError) StatusType

func (o ObjectStatusError) StatusType() ObjectStatusType

type ObjectStatusInProgress

type ObjectStatusInProgress struct {
	Message string
}

func (ObjectStatusInProgress) StatusType

type ObjectStatusReady

type ObjectStatusReady struct {
	Message string
}

func (ObjectStatusReady) StatusType

func (o ObjectStatusReady) StatusType() ObjectStatusType

type ObjectStatusResult

type ObjectStatusResult interface {
	StatusType() ObjectStatusType
}

type ObjectStatusType

type ObjectStatusType string
const (
	ObjectStatusTypeReady      ObjectStatusType = "Ready"
	ObjectStatusTypeUnknown    ObjectStatusType = "Unknown"
	ObjectStatusTypeInProgress ObjectStatusType = "InProgress"
	ObjectStatusTypeError      ObjectStatusType = "Error"
)

type ObjectStatusUnknown

type ObjectStatusUnknown struct {
	Details string
}

func (ObjectStatusUnknown) StatusType

func (o ObjectStatusUnknown) StatusType() ObjectStatusType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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