Documentation ¶
Index ¶
- Variables
- type DevicesScheduler
- func (ds *DevicesScheduler) AddDevice(device sctypes.DeviceScheduler)
- func (ds *DevicesScheduler) AddDevicesSchedulerFromPlugins(pluginNames []string)
- func (ds *DevicesScheduler) AddNode(nodeName string, nodeInfo *types.NodeInfo)
- func (ds *DevicesScheduler) PodAllocate(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) error
- func (ds *DevicesScheduler) PodFitsResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo, fillAllocateFrom bool) (bool, []sctypes.PredicateFailureReason, float64)
- func (ds *DevicesScheduler) PodPriority(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) float64
- func (ds *DevicesScheduler) RemoveAll()
- func (ds *DevicesScheduler) RemoveNode(nodeName string)
- func (ds *DevicesScheduler) RemovePodFromScore(podInfo *types.PodInfo)
- func (ds *DevicesScheduler) ReturnPodResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) error
- func (ds *DevicesScheduler) TakePodResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) error
- type GrpDevice
- func (d *GrpDevice) AddNode(nodeName string, nodeInfo *types.NodeInfo)
- func (d *GrpDevice) GetName() string
- func (d *GrpDevice) PodAllocate(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (d *GrpDevice) PodFitsDevice(nodeInfo *types.NodeInfo, podInfo *types.PodInfo, fillAllocateFrom bool) (bool, []sctypes.PredicateFailureReason, float64)
- func (d *GrpDevice) RemoveNode(nodeName string)
- func (d *GrpDevice) ReturnPodResources(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (d *GrpDevice) TakePodResources(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (d *GrpDevice) UsingGroupScheduler() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var DeviceScheduler = &DevicesScheduler{ hasGroupScheduler: false, score: make(map[string]map[string]float64), maxScore: make(map[string]float64), }
essentially a static variable
Functions ¶
This section is empty.
Types ¶
type DevicesScheduler ¶
type DevicesScheduler struct { sync.Mutex Devices []sctypes.DeviceScheduler // contains filtered or unexported fields }
func (*DevicesScheduler) AddDevice ¶
func (ds *DevicesScheduler) AddDevice(device sctypes.DeviceScheduler)
func (*DevicesScheduler) AddDevicesSchedulerFromPlugins ¶
func (ds *DevicesScheduler) AddDevicesSchedulerFromPlugins(pluginNames []string)
func (*DevicesScheduler) AddNode ¶
func (ds *DevicesScheduler) AddNode(nodeName string, nodeInfo *types.NodeInfo)
AddNode adds node reources to devices scheduler
func (*DevicesScheduler) PodAllocate ¶
allocate devices & write into annotations
func (*DevicesScheduler) PodFitsResources ¶
func (ds *DevicesScheduler) PodFitsResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo, fillAllocateFrom bool) (bool, []sctypes.PredicateFailureReason, float64)
predicate
func (*DevicesScheduler) PodPriority ¶
priority - returns number between 0 and 1 (1 for node with maximum score)
func (*DevicesScheduler) RemoveAll ¶
func (ds *DevicesScheduler) RemoveAll()
func (*DevicesScheduler) RemoveNode ¶
func (ds *DevicesScheduler) RemoveNode(nodeName string)
RemoveNode removes node resources
func (*DevicesScheduler) RemovePodFromScore ¶
func (ds *DevicesScheduler) RemovePodFromScore(podInfo *types.PodInfo)
func (*DevicesScheduler) ReturnPodResources ¶
func (ds *DevicesScheduler) ReturnPodResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) error
return pod resources used by devices
func (*DevicesScheduler) TakePodResources ¶
func (ds *DevicesScheduler) TakePodResources(podInfo *types.PodInfo, nodeInfo *types.NodeInfo) error
take pod resources used by devices
type GrpDevice ¶
type GrpDevice struct { }
func (*GrpDevice) PodAllocate ¶
func (*GrpDevice) PodFitsDevice ¶
func (*GrpDevice) RemoveNode ¶
func (*GrpDevice) ReturnPodResources ¶
func (*GrpDevice) TakePodResources ¶
func (*GrpDevice) UsingGroupScheduler ¶
Click to show internal directories.
Click to hide internal directories.