Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opts ¶
type Opts[T comparable] struct { // Ratelimiter is being used when AddRateLimited is called. Defaults to a per-item exponential backoff // limiter with an initial delay of five milliseconds and a max delay of 1000 seconds. RateLimiter workqueue.TypedRateLimiter[T] MetricProvider workqueue.MetricsProvider }
Opts contains the options for a PriorityQueue.
type PriorityQueue ¶
type PriorityQueue[T comparable] interface { workqueue.TypedRateLimitingInterface[T] AddWithOpts(o AddOpts, Items ...T) GetWithPriority() (item T, priority int, shutdown bool) }
PriorityQueue is a priority queue for a controller. It internally de-duplicates all items that are added to it. It will use the max of the passed priorities and the min of possible durations.
func New ¶
func New[T comparable](name string, o ...Opt[T]) PriorityQueue[T]
New constructs a new PriorityQueue.
Click to show internal directories.
Click to hide internal directories.