queue

package
v0.30.40 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 43

Documentation

Index

Constants

View Source
const (
	// NamespaceDemo means the object is in the demo namespace
	NamespaceDemo string = "demo"
)

Variables

This section is empty.

Functions

func DefaultEventHandler

func DefaultEventHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

func Enqueue

func Enqueue(queue workqueue.RateLimitingInterface, obj interface{})

func EnqueueAfter

func EnqueueAfter(queue workqueue.RateLimitingInterface, obj interface{}, duration time.Duration)

func NewChangeHandler

func NewChangeHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

func NewDeleteHandler

func NewDeleteHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

func NewEventHandler

func NewEventHandler(queue workqueue.RateLimitingInterface, enqueueUpdate func(oldObj, newObj interface{}) bool, restrictToNamespace string) cache.ResourceEventHandler

func NewReconcilableHandler

func NewReconcilableHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

func NewSpecStatusChangeHandler

func NewSpecStatusChangeHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

func NewUpsertHandler

func NewUpsertHandler(queue workqueue.RateLimitingInterface, restrictToNamespace string) cache.ResourceEventHandler

Types

type QueueingEventHandler

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

QueueingEventHandler queues the key for the object on add and update events

func (*QueueingEventHandler) OnAdd

func (h *QueueingEventHandler) OnAdd(obj interface{}, isInInitialList bool)

func (*QueueingEventHandler) OnDelete

func (h *QueueingEventHandler) OnDelete(obj interface{})

func (*QueueingEventHandler) OnUpdate

func (h *QueueingEventHandler) OnUpdate(oldObj, newObj interface{})

type Worker

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

Worker continuously runs a Reconcile function against a message Queue

func New

func New(name string, maxRetries, threadiness int, fn func(key string) error) *Worker

func (*Worker) GetQueue

func (w *Worker) GetQueue() workqueue.RateLimitingInterface

func (*Worker) Run

func (w *Worker) Run(shutdown <-chan struct{})

Run schedules a routine to continuously process Queue messages until shutdown is closed

Jump to

Keyboard shortcuts

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