scheduler

package
v0.0.0-...-1a62c48 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 1 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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