context

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerContext

type ControllerContext struct {
	KubeClient kubernetes.Interface

	Cloud *gce.GCECloud

	IngressInformer       cache.SharedIndexInformer
	ServiceInformer       cache.SharedIndexInformer
	BackendConfigInformer cache.SharedIndexInformer
	PodInformer           cache.SharedIndexInformer
	NodeInformer          cache.SharedIndexInformer
	EndpointInformer      cache.SharedIndexInformer

	NEGEnabled           bool
	BackendConfigEnabled bool
	// contains filtered or unexported fields
}

ControllerContext holds the state needed for the execution of the controller.

func NewControllerContext

func NewControllerContext(
	kubeClient kubernetes.Interface,
	backendConfigClient backendconfigclient.Interface,
	cloud *gce.GCECloud,
	namespace string,
	resyncPeriod time.Duration,
	enableNEG bool,
	enableBackendConfig bool) *ControllerContext

NewControllerContext returns a new shared set of informers.

func (*ControllerContext) AddHealthCheck added in v1.2.2

func (ctx *ControllerContext) AddHealthCheck(id string, hc func() error)

AddHealthCheck registers function to be called for healthchecking.

func (*ControllerContext) HasSynced

func (ctx *ControllerContext) HasSynced() bool

HasSynced returns true if all relevant informers has been synced.

func (*ControllerContext) HealthCheck added in v1.2.2

func (ctx *ControllerContext) HealthCheck() HealthCheckResults

HealthCheck runs all registered healthcheck functions.

func (*ControllerContext) Recorder

func (ctx *ControllerContext) Recorder(ns string) record.EventRecorder

func (*ControllerContext) Start

func (ctx *ControllerContext) Start(stopCh chan struct{})

Start all of the informers.

type HealthCheckResults added in v1.2.2

type HealthCheckResults map[string]error

HealthCheckResults contains a mapping of component -> health check results.

Jump to

Keyboard shortcuts

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