Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Name is the name of the plugin used in Registry and configurations. Name = "Bullfinch" SumAllocatableCpu = "SumAllocatableCpu" SumAllocatableMem = "SumAllocatableMem" SumAllocatableGpuMem = "SumAllocatableGpuMem" ScaledResourceName = "aliyun.com/gpu-mem" WorkloadNodeList = "WorkloadNodeList" IdelnessHitNodes = "xxx.com/idelness-hit-nodes" NodeName = "xxx.com/nodename" )
Variables ¶
This section is empty.
Functions ¶
func NewBullfinchStateData ¶
Types ¶
type BullfinchStateData ¶
type BullfinchStateData struct { }
func (*BullfinchStateData) Clone ¶
func (d *BullfinchStateData) Clone() framework.StateData
type Item ¶
type Item struct { Value interface{} Priority float64 // 优先级队列中节点的优先级 // contains filtered or unexported fields }
Item 优先队列
type PriorityQueue ¶
type PriorityQueue []*Item
PriorityQueue 优先级队列需要实现heap的interface
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
Pop 绑定put方法,将index置为-1是为了标识该数据已经出了优先级队列了
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.