Documentation ¶
Index ¶
- Constants
- func AlwaysFoundScoreFunc(allocatable int64, usedByPod int64, usedByNode int64, requested []int64, ...) (found bool, score float64, usedByContainer int64, ...)
- func EnumScoreFunc(allocatable int64, usedByPod int64, usedByNode int64, requested []int64, ...) (found bool, score float64, usedByContainer int64, ...)
- func LeftoverScoreFunc(allocatable int64, usedByPod int64, usedByNode int64, requested []int64, ...) (found bool, score float64, usedByContainer int64, ...)
- type ResourceScoreFunc
Constants ¶
View Source
const ( DefaultScorer = iota // 0 LeftOverScorer EnumLeftOverScorer )
Variables ¶
This section is empty.
Functions ¶
func AlwaysFoundScoreFunc ¶
func AlwaysFoundScoreFunc(allocatable int64, usedByPod int64, usedByNode int64, requested []int64, initContainer bool) ( found bool, score float64, usedByContainer int64, newUsedByPod, newUsedByNode int64)
AlwaysFoundScoreFunc provides something that always returns true want to make allocatable-used as close to requested
Types ¶
type ResourceScoreFunc ¶
type ResourceScoreFunc func(alloctable int64, usedByPod int64, usedByNode int64, requested []int64, initContainer bool) (bool, float64, int64, int64, int64)
func GetDefaultScorer ¶
func GetDefaultScorer(resource types.ResourceName) ResourceScoreFunc
GetDefaultScorer returns default scorer given a name
func SetScorer ¶
func SetScorer(resource types.ResourceName, scorerType int32) ResourceScoreFunc
Click to show internal directories.
Click to hide internal directories.