Documentation ¶
Index ¶
Constants ¶
View Source
const ( //CPU_PRIOR define cpu select CPU_PRIOR = "CPU" //MEMORY_PRIOR define mem select MEMORY_PRIOR = "MEM" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler interface { // select one node from nodes, returns nodename // typically used to build image MaxCPUIdleNode(nodes []*types.Node) *types.Node SelectMemoryNodes(nodesInfo []types.NodeInfo, quota float64, memory int64) ([]types.NodeInfo, int, error) // select nodes from nodes, return a list of nodenames and the corresponding cpumap, and also the changed nodes with remaining cpumap // quota and number must be given, typically used to determine where to deploy SelectCPUNodes(nodesInfo []types.NodeInfo, quota float64, memory int64) ([]types.NodeInfo, map[string][]types.CPUMap, int, error) // common division CommonDivision(nodesInfo []types.NodeInfo, need, total int) ([]types.NodeInfo, error) // average division EachDivision(nodesInfo []types.NodeInfo, need, total int) ([]types.NodeInfo, error) // fill division FillDivision(nodesInfo []types.NodeInfo, need, total int) ([]types.NodeInfo, error) }
Scheduler is a scheduler is used to determine which nodes are we gonna use. `types.CPUMap` represents the CPU label and remaining quota. `nodes` represents node name and the corresponding CPUMap.
Click to show internal directories.
Click to hide internal directories.