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 ¶
WithWorkqueueName sets a name for the workqueue.
func WithWorkqueueRateLimiter ¶
func WithWorkqueueRateLimiter(rateLimiter workqueue.RateLimiter) Option
WithWorkqueueRateLimiter sets a rate limiter for the workqueue.