controller

package
v0.0.0-...-f574404 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const MetricsQueueEnv = "NORMAN_QUEUE_METRICS"
View Source
const MetricsReflectorEnv = "NORMAN_REFLECTOR_METRICS"

Variables

This section is empty.

Functions

func DisableAllControllerMetrics

func DisableAllControllerMetrics()

func DisableControllerReflectorMetrics

func DisableControllerReflectorMetrics()

func DisableControllerWorkqueuMetrics

func DisableControllerWorkqueuMetrics()

func ObjectInCluster

func ObjectInCluster(cluster string, obj interface{}) bool

func Start

func Start(ctx context.Context, threadiness int, starters ...Starter) error

func Sync

func Sync(ctx context.Context, starters ...Starter) error

func SyncThenStart

func SyncThenStart(ctx context.Context, threadiness int, starters ...Starter) error

Types

type Backend

type Backend interface {
	List(opts metav1.ListOptions) (runtime.Object, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	ObjectFactory() objectclient.ObjectFactory
}

type ForgetError

type ForgetError struct {
	Err    error
	Reason string
}

func (*ForgetError) Error

func (f *ForgetError) Error() string

type GenericController

type GenericController interface {
	SetThreadinessOverride(count int)
	Informer() cache.SharedIndexInformer
	AddHandler(ctx context.Context, name string, handler HandlerFunc)
	HandlerCount() int
	Enqueue(namespace, name string)
	Sync(ctx context.Context) error
	Start(ctx context.Context, threadiness int) error
}

func NewGenericController

func NewGenericController(name string, genericClient Backend) GenericController

type HandlerFunc

type HandlerFunc func(key string, obj interface{}) (interface{}, error)

type Starter

type Starter interface {
	Sync(ctx context.Context) error
	Start(ctx context.Context, threadiness int) error
}

Jump to

Keyboard shortcuts

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