controllerbase

package
v0.11.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFinalizer

func RemoveFinalizer(metaObj *metav1.ObjectMeta, finalizer string)

func WrapRetryError

func WrapRetryError(err error) error

Types

type Controller

type Controller struct {
	Base ControllerBase
	// contains filtered or unexported fields
}

func NewController

func NewController(base ControllerBase, coreClient kubernetes.Interface) *Controller

func (*Controller) EventRecorder

func (c *Controller) EventRecorder() record.EventRecorder

func (*Controller) Log

func (c *Controller) Log() *zap.Logger

func (*Controller) OnAdd

func (c *Controller) OnAdd(obj interface{})

func (*Controller) OnDelete

func (c *Controller) OnDelete(obj interface{})

func (*Controller) OnUpdate

func (c *Controller) OnUpdate(old, new interface{})

func (*Controller) ProcessKey

func (c *Controller) ProcessKey(key string) error

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, workers int)

type ControllerBase

type ControllerBase interface {
	Name() string
	Finalizers() []string
	ListerSynced() []cache.InformerSynced
	EventSources() []cache.SharedIndexInformer
	ConvertToKeys() ObjectToKeyConverter
	GetObject(key string) (interface{}, error)
	UpdateObject(ctx context.Context, obj interface{}) error
	Reconcile(ctx context.Context, obj interface{}) error
	Finalize(ctx context.Context, obj interface{}) error
}

type ObjectToKeyConverter

type ObjectToKeyConverter func(obj interface{}) (keys []string, err error)

type RetryError

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

func (*RetryError) Error

func (e *RetryError) Error() string

func (*RetryError) Is

func (e *RetryError) Is(err error) bool

func (*RetryError) Unwrap

func (e *RetryError) Unwrap() error

Jump to

Keyboard shortcuts

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