workqueue

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialFailureRateLimiter

func ExponentialFailureRateLimiter[T comparable](failInitialWait, failMaxWait time.Duration) workqueue.TypedRateLimiter[T]

func IngressReconcilerRateLimiter

func IngressReconcilerRateLimiter[T comparable](rateLimitUpdate float64, waitBeforeUpdate time.Duration) workqueue.TypedRateLimiter[T]

func ReloadHAProxyRateLimiter

func ReloadHAProxyRateLimiter(reloadInterval time.Duration) workqueue.TypedRateLimiter[any]

Types

type Options

type Options struct {
	// Workers defines the number of worker threads, defaults to 1 if not declared
	Workers int
}

type SyncCallback

type SyncCallback[T comparable] func(context.Context, T) error

type WorkQueue

type WorkQueue[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](sync SyncCallback[T], rateLimiter workqueue.TypedRateLimiter[T], opts ...Options) *WorkQueue[T]

func (*WorkQueue[T]) Add

func (w *WorkQueue[T]) Add(item T)

func (*WorkQueue[T]) AddAfter

func (w *WorkQueue[T]) AddAfter(item T, duration time.Duration)

func (*WorkQueue[T]) Len

func (w *WorkQueue[T]) Len() int

func (*WorkQueue[T]) Remove

func (w *WorkQueue[T]) Remove(item T)

func (*WorkQueue[T]) Start

func (w *WorkQueue[T]) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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