Documentation ¶
Index ¶
- Constants
- Variables
- type DeviceInfo
- type DeviceInfoBrief
- type GpuNodeInfo
- func (n *GpuNodeInfo) AllocateGpuId(pod *v1.Pod) (candDevId string, found bool)
- func (n *GpuNodeInfo) ExportGpuNodeInfoAsStr() *GpuNodeInfoStr
- func (n *GpuNodeInfo) GetDevByDevId(devId int) (*DeviceInfo, bool)
- func (n *GpuNodeInfo) GetDevs() []*DeviceInfo
- func (n *GpuNodeInfo) GetGpuCount() int
- func (n *GpuNodeInfo) GetName() string
- func (n *GpuNodeInfo) GetNode() *v1.Node
- func (n *GpuNodeInfo) Reset(node *v1.Node)
- type GpuNodeInfoStr
- type NodePodGetter
- type SchedulerCache
- func (cache *SchedulerCache) AddOrUpdatePod(pod *v1.Pod, nodeName string) error
- func (cache *SchedulerCache) BuildCacheFromPodList(podList []*v1.Pod) error
- func (cache *SchedulerCache) ExportGpuNodeInfoAsStr(nodeName string) (*GpuNodeInfoStr, error)
- func (cache *SchedulerCache) GetGpuNodeInfo(name string) (*GpuNodeInfo, error)
- func (cache *SchedulerCache) GetGpuNodeinfos() []*GpuNodeInfo
- func (cache *SchedulerCache) GetPod(name, namespace string) (*v1.Pod, error)
- func (cache *SchedulerCache) KnownPod(podUID types.UID) bool
- func (cache *SchedulerCache) RemovePod(pod *v1.Pod, nodeName string)
Constants ¶
View Source
const (
OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again"
)
Variables ¶
View Source
var ( ConfigMapLister corelisters.ConfigMapLister ConfigMapInformerSynced clientgocache.InformerSynced )
Functions ¶
This section is empty.
Types ¶
type DeviceInfo ¶
type DeviceInfo struct {
// contains filtered or unexported fields
}
func (*DeviceInfo) ExportDeviceInfoBrief ¶
func (d *DeviceInfo) ExportDeviceInfoBrief() *DeviceInfoBrief
func (*DeviceInfo) GetPods ¶
func (d *DeviceInfo) GetPods() []*v1.Pod
func (*DeviceInfo) GetUsedGpuMilli ¶
func (d *DeviceInfo) GetUsedGpuMilli() (gpuMilli int64)
type DeviceInfoBrief ¶
type GpuNodeInfo ¶
type GpuNodeInfo struct {
// contains filtered or unexported fields
}
GpuNodeInfo is node level aggregated information.
func NewGpuNodeInfo ¶
func NewGpuNodeInfo(node *v1.Node) *GpuNodeInfo
NewGpuNodeInfo creates Node Level
func (*GpuNodeInfo) AllocateGpuId ¶
func (n *GpuNodeInfo) AllocateGpuId(pod *v1.Pod) (candDevId string, found bool)
AllocateGpuId is the key of GPU allocating; it assigns the GPU ID to the pod
func (*GpuNodeInfo) ExportGpuNodeInfoAsStr ¶
func (n *GpuNodeInfo) ExportGpuNodeInfoAsStr() *GpuNodeInfoStr
func (*GpuNodeInfo) GetDevByDevId ¶
func (n *GpuNodeInfo) GetDevByDevId(devId int) (*DeviceInfo, bool)
func (*GpuNodeInfo) GetDevs ¶
func (n *GpuNodeInfo) GetDevs() []*DeviceInfo
func (*GpuNodeInfo) GetGpuCount ¶
func (n *GpuNodeInfo) GetGpuCount() int
func (*GpuNodeInfo) GetName ¶
func (n *GpuNodeInfo) GetName() string
func (*GpuNodeInfo) GetNode ¶
func (n *GpuNodeInfo) GetNode() *v1.Node
func (*GpuNodeInfo) Reset ¶
func (n *GpuNodeInfo) Reset(node *v1.Node)
Reset only updates the devices when the length of devs is 0
type GpuNodeInfoStr ¶
type NodePodGetter ¶
type SchedulerCache ¶
type SchedulerCache struct {
// contains filtered or unexported fields
}
func NewSchedulerCache ¶
func NewSchedulerCache(getter NodePodGetter) *SchedulerCache
func (*SchedulerCache) AddOrUpdatePod ¶
func (cache *SchedulerCache) AddOrUpdatePod(pod *v1.Pod, nodeName string) error
func (*SchedulerCache) BuildCacheFromPodList ¶
func (cache *SchedulerCache) BuildCacheFromPodList(podList []*v1.Pod) error
func (*SchedulerCache) ExportGpuNodeInfoAsStr ¶
func (cache *SchedulerCache) ExportGpuNodeInfoAsStr(nodeName string) (*GpuNodeInfoStr, error)
func (*SchedulerCache) GetGpuNodeInfo ¶
func (cache *SchedulerCache) GetGpuNodeInfo(name string) (*GpuNodeInfo, error)
Get or build nodeInfo if it doesn't exist
func (*SchedulerCache) GetGpuNodeinfos ¶
func (cache *SchedulerCache) GetGpuNodeinfos() []*GpuNodeInfo
func (*SchedulerCache) GetPod ¶
func (cache *SchedulerCache) GetPod(name, namespace string) (*v1.Pod, error)
Click to show internal directories.
Click to hide internal directories.