Documentation ¶
Index ¶
- Constants
- func ComparePriorityForDebug(annotations1, annotations2 map[string]string) int
- func GetPriorityForDebug(annotations map[string]string) int
- func New(_ runtime.Object) (framework.UnitQueueSortPlugin, error)
- func NewFCFS(_ runtime.Object) (framework.UnitQueueSortPlugin, error)
- type DefaultUnitQueueSort
- type FCFS
Constants ¶
const ( LESS = iota EQUAL GREATER PriorityForDebugAnnotation = "godel.bytedance.com/customized-priority-for-debug" )
const FCFSName = "FCFS"
FCFSName is the name of the plugin used in the plugin registry and configurations. FCFS means first created first serve, which is to sort units by creation timestamp in ascend order.
const (
// Name is the name of the plugin used in the plugin registry and configurations.
Name = "DefaultUnitQueueSort"
)
Variables ¶
This section is empty.
Functions ¶
func ComparePriorityForDebug ¶
func GetPriorityForDebug ¶
Types ¶
type DefaultUnitQueueSort ¶
type DefaultUnitQueueSort struct{}
DefaultUnitQueueSort is a plugin that implements Priority based sorting.
func (DefaultUnitQueueSort) Less ¶
func (p DefaultUnitQueueSort) Less(uInfo1 *framework.QueuedUnitInfo, uInfo2 *framework.QueuedUnitInfo) bool
Less is the function used by the activeQ heap algorithm to sort pods. It sorts pods based on their priority. When priorities are equal, it uses PodQueueInfo.timestamp.
func (DefaultUnitQueueSort) Name ¶
func (p DefaultUnitQueueSort) Name() string
Name returns name of the plugin.
type FCFS ¶
type FCFS struct{}
FCFS is a plugin that implements Priority based sorting.
func (*FCFS) Less ¶
func (p *FCFS) Less(uInfo1 *framework.QueuedUnitInfo, uInfo2 *framework.QueuedUnitInfo) bool
Less is the function used by the activeQ heap algorithm to sort pods. It sorts pods based on their priority. When priorities are equal, it uses QueuedUnitInfo.CreationTimestamp.