queueinformer

package
v0.0.0-1e295784b-1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoopID

func NewLoopID() string

Types

type Operator

type Operator struct {
	OpClient operatorclient.ClientInterface
	Log      *logrus.Logger
	// contains filtered or unexported fields
}

An Operator is a collection of QueueInformers OpClient is used to establish the connection to kubernetes

func NewOperator

func NewOperator(kubeconfig string, logger *logrus.Logger, queueInformers ...*QueueInformer) (*Operator, error)

NewOperator creates a new Operator configured to manage the cluster defined in kubeconfig.

func NewOperatorFromClient

func NewOperatorFromClient(opClient operatorclient.ClientInterface, logger *logrus.Logger, queueInformers ...*QueueInformer) (*Operator, error)

func (*Operator) RegisterInformer

func (o *Operator) RegisterInformer(informer cache.SharedIndexInformer)

RegisterInformer adds an Informer to this operator

func (*Operator) RegisterQueueInformer

func (o *Operator) RegisterQueueInformer(queueInformer *QueueInformer)

RegisterQueueInformer adds a QueueInformer to this operator

func (*Operator) Run

func (o *Operator) Run(stopc <-chan struct{}) (ready, done chan struct{})

Run starts the operator's control loops

type QueueInformer

type QueueInformer struct {
	metrics.MetricsProvider
	// contains filtered or unexported fields
}

QueueInformer ties an informer to a queue in order to process events from the informer the informer watches objects of interest and adds objects to the queue for processing the syncHandler is called for all objects on the queue

func New

New creates a set of new queueinformers given a name, a set of informers, and a sync handler to handle the objects that the operator is managing. Optionally, custom event handler funcs can be passed in (defaults will be provided)

func NewInformer

NewInformer creates a new queueinformer given a name, an informer, and a sync handler to handle the objects that the operator is managing. Optionally, custom event handler funcs can be passed in (defaults will be provided)

type ResourceQueueSet

type ResourceQueueSet map[string]workqueue.RateLimitingInterface

func (ResourceQueueSet) Remove

func (r ResourceQueueSet) Remove(name, namespace string) error

func (ResourceQueueSet) Requeue

func (r ResourceQueueSet) Requeue(name, namespace string) error

type SyncHandler

type SyncHandler func(obj interface{}) error

SyncHandler is the function that reconciles the controlled object when seen

Jump to

Keyboard shortcuts

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