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: 5 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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