k8s

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package k8s contains helpers for setting the IngressRoute status

Index

Constants

View Source
const (
	StatusValid    = "valid"
	StatusInvalid  = "invalid"
	StatusOrphaned = "orphaned"
)

Variables

This section is empty.

Functions

func KindOf added in v1.1.0

func KindOf(obj interface{}) string

KindOf returns the kind string for the given Kubernetes object.

The API machinery doesn't populate the metav1.TypeMeta field for objects, so we have to use a type assertion to detect kinds that we care about.

Types

type StatusCacher added in v1.1.0

type StatusCacher struct {
	// contains filtered or unexported fields
}

StatusCacher keeps a cache of the latest status updates for Kubernetes objects.

func (*StatusCacher) Delete added in v1.1.0

func (c *StatusCacher) Delete(obj interface{})

Delete removes an object from the status cache.

func (*StatusCacher) GetStatus added in v1.1.0

func (c *StatusCacher) GetStatus(obj interface{}) (*projcontour.Status, error)

GetStatus returns the status (if any) for this given object.

func (*StatusCacher) SetStatus added in v1.1.0

func (c *StatusCacher) SetStatus(status, desc string, obj interface{}) error

SetStatus sets the IngressRoute status field to an Valid or Invalid status

type StatusClient added in v1.1.0

type StatusClient interface {
	SetStatus(status string, desc string, obj interface{}) error
	GetStatus(obj interface{}) (*projcontour.Status, error)
}

StatusClient updates the Status on a Kubernetes object.

type StatusWriter added in v1.1.0

type StatusWriter struct {
	Client clientset.Interface
}

StatusWriter updates the object's Status field.

func (*StatusWriter) GetStatus added in v1.1.0

func (irs *StatusWriter) GetStatus(obj interface{}) (*projcontour.Status, error)

GetStatus is not implemented for StatusWriter.

func (*StatusWriter) SetStatus added in v1.1.0

func (irs *StatusWriter) SetStatus(status, desc string, existing interface{}) error

SetStatus sets the IngressRoute status field to an Valid or Invalid status

Jump to

Keyboard shortcuts

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