readychecker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: Apache-2.0 Imports: 7 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 IsObjectReady

type IsObjectReady func(*unstructured.Unstructured) (isReady, retriableError bool, e error)

IsObjectReady checks if an object is Ready. Each function is responsible for handling different versions of objects itself.

type ReadyChecker

type ReadyChecker struct {
	Store      CrdStore
	KnownTypes map[schema.GroupKind]IsObjectReady
}

func New

func New(store CrdStore, kts ...map[schema.GroupKind]IsObjectReady) *ReadyChecker

func (*ReadyChecker) IsReady

func (rc *ReadyChecker) IsReady(obj *unstructured.Unstructured) (isReady, retriableError bool, e error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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