queue

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package queue features a scheduling queue, which keeps track of all placements for the scheduler to schedule.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterPolicySnapshotKey

type ClusterPolicySnapshotKey string

ClusterPolicySnapshotKey is the unique identifier (its name) for a ClusterPolicySnapshot stored in a scheduling queue.

type ClusterPolicySnapshotKeySchedulingQueue

type ClusterPolicySnapshotKeySchedulingQueue interface {
	ClusterPolicySnapshotKeySchedulingQueueWriter

	// Run starts the scheduling queue.
	Run()
	// Close closes the scheduling queue immediately.
	Close()
	// CloseWithDrain closes the scheduling queue after all items in the queue are processed.
	CloseWithDrain()
	// NextClusterPolicySnapshotKey returns the next-in-line ClusterPolicySnapshot key for the scheduler to schedule.
	NextClusterPolicySnapshotKey() (key ClusterPolicySnapshotKey, closed bool)
	// Done marks a ClusterPolicySnapshot key as done.
	Done(cpsKey ClusterPolicySnapshotKey)
}

ClusterPolicySnapshotSchedulingQueue is an interface which queues ClusterPolicySnapshots for the scheduler to schedule.

func NewSimpleClusterPolicySnapshotKeySchedulingQueue

func NewSimpleClusterPolicySnapshotKeySchedulingQueue(opts ...Option) ClusterPolicySnapshotKeySchedulingQueue

NewSimpleClusterPolicySnapshotKeySchedulingQueue returns a simpleClusterPolicySnapshotKeySchedulingQueue.

type ClusterPolicySnapshotKeySchedulingQueueWriter

type ClusterPolicySnapshotKeySchedulingQueueWriter interface {
	Add(cpsKey ClusterPolicySnapshotKey)
}

ClusterPolicySnapshotKeySchedulingQueueWriter is an interface which allows sources, such as controllers, to add ClusterPolicySnapshots to the scheduling queue.

type Option

type Option func(*simpleClusterPolicySnapshotKeySchedulingQueueOptions)

Option is the function that configures the simpleClusterPolicySnapshotKeySchedulingQueue.

func WithWorkqueueName

func WithWorkqueueName(name string) Option

WithWorkqueueName sets a name for the workqueue.

func WithWorkqueueRateLimiter

func WithWorkqueueRateLimiter(rateLimiter workqueue.RateLimiter) Option

WithWorkqueueRateLimiter sets a rate limiter for the workqueue.

Jump to

Keyboard shortcuts

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