Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NodeSchedulerPolicyAnnotationKey is user set Pod annotation to change this default node policy. NodeSchedulerPolicyAnnotationKey = "hami.io/node-scheduler-policy" // GPUSchedulerPolicyAnnotationKey is user set Pod annotation to change this default GPU policy. GPUSchedulerPolicyAnnotationKey = "hami.io/gpu-scheduler-policy" )
View Source
const (
Weight int = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceListsScore ¶
type DeviceListsScore struct { Device *util.DeviceUsage // Score recode every device user/allocate score Score float32 }
func (*DeviceListsScore) ComputeScore ¶
func (ds *DeviceListsScore) ComputeScore(requests util.ContainerDeviceRequests)
type DeviceUsageList ¶
type DeviceUsageList struct { DeviceLists []*DeviceListsScore Policy string }
func (DeviceUsageList) Len ¶
func (l DeviceUsageList) Len() int
func (DeviceUsageList) Less ¶
func (l DeviceUsageList) Less(i, j int) bool
func (DeviceUsageList) Swap ¶
func (l DeviceUsageList) Swap(i, j int)
type NodeScore ¶
type NodeScore struct { NodeID string Devices util.PodDevices // Score recode every node all device user/allocate score Score float32 }
func (*NodeScore) ComputeScore ¶
func (ns *NodeScore) ComputeScore(devices DeviceUsageList)
type NodeScoreList ¶
func (NodeScoreList) Len ¶
func (l NodeScoreList) Len() int
func (NodeScoreList) Less ¶
func (l NodeScoreList) Less(i, j int) bool
func (NodeScoreList) Swap ¶
func (l NodeScoreList) Swap(i, j int)
type SchedulerPolicyName ¶
type SchedulerPolicyName string
const ( // NodeSchedulerPolicyBinpack is node use binpack scheduler policy. NodeSchedulerPolicyBinpack SchedulerPolicyName = "binpack" // NodeSchedulerPolicySpread is node use spread scheduler policy. NodeSchedulerPolicySpread SchedulerPolicyName = "spread" // GPUSchedulerPolicyBinpack is GPU use binpack scheduler. GPUSchedulerPolicyBinpack SchedulerPolicyName = "binpack" // GPUSchedulerPolicySpread is GPU use spread scheduler. GPUSchedulerPolicySpread SchedulerPolicyName = "spread" )
func (SchedulerPolicyName) String ¶
func (s SchedulerPolicyName) String() string
Click to show internal directories.
Click to hide internal directories.