core

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

type Coordinator interface {
	Run(ctx context.Context)
	EnqueueOrUpdate(qu *jobcoordinator.QueueUnit)
	Dequeue(uid types.UID)
	IsQueuing(uid types.UID) bool
	SetQueueUnitOwner(uid types.UID, owner workqueue.RateLimitingInterface)
}

func NewCoordinator

func NewCoordinator(mgr ctrl.Manager) Coordinator

type Iterator

type Iterator interface {
	// HasNext indicates that is iterator at the ending position of queue.
	HasNext() bool
	// Next returns current unit pointed by pivot and increment pivot.
	Next() *jobcoordinator.QueueUnit
}

Iterator defines how to iterate a units queue, and it is irreversible once pivot has incremented.

type QueueSelector

type QueueSelector interface {
	Next(queues map[string]*queue) (string, *queue)
}

func NewRoundRobinSelector

func NewRoundRobinSelector() QueueSelector

Jump to

Keyboard shortcuts

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