Documentation ¶
Index ¶
- Constants
- type DeviceInfo
- type NodeInfo
- func (n *NodeInfo) Allocate(clientset *kubernetes.Clientset, pod *v1.Pod) (err error)
- func (n *NodeInfo) Assume(pod *v1.Pod) (allocatable bool)
- func (n *NodeInfo) GetDevs() []*DeviceInfo
- func (n *NodeInfo) GetGPUCount() int
- func (n *NodeInfo) GetName() string
- func (n *NodeInfo) GetNode() *v1.Node
- func (n *NodeInfo) GetTotalGPUMemory() int
- type SchedulerCache
- func (cache *SchedulerCache) AddOrUpdatePod(pod *v1.Pod) error
- func (cache *SchedulerCache) BuildCache() error
- func (cache *SchedulerCache) GetNodeInfo(name string) (*NodeInfo, error)
- func (cache *SchedulerCache) GetNodeinfos() []*NodeInfo
- 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)
Constants ¶
View Source
const (
OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceInfo ¶
type DeviceInfo struct {
// contains filtered or unexported fields
}
func (*DeviceInfo) GetPods ¶
func (d *DeviceInfo) GetPods() []*v1.Pod
func (*DeviceInfo) GetTotalGPUMemory ¶
func (d *DeviceInfo) GetTotalGPUMemory() uint
func (*DeviceInfo) GetUsedGPUMemory ¶
func (d *DeviceInfo) GetUsedGPUMemory() (gpuMem uint)
type NodeInfo ¶
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo is node level aggregated information.
func (*NodeInfo) GetDevs ¶
func (n *NodeInfo) GetDevs() []*DeviceInfo
func (*NodeInfo) GetGPUCount ¶
func (*NodeInfo) GetTotalGPUMemory ¶
type SchedulerCache ¶
type SchedulerCache struct {
// contains filtered or unexported fields
}
func NewSchedulerCache ¶
func NewSchedulerCache(nLister corelisters.NodeLister, pLister corelisters.PodLister) *SchedulerCache
func (*SchedulerCache) AddOrUpdatePod ¶
func (cache *SchedulerCache) AddOrUpdatePod(pod *v1.Pod) error
func (*SchedulerCache) BuildCache ¶
func (cache *SchedulerCache) BuildCache() error
build cache when initializing
func (*SchedulerCache) GetNodeInfo ¶
func (cache *SchedulerCache) GetNodeInfo(name string) (*NodeInfo, error)
Get or build nodeInfo if it doesn't exist
func (*SchedulerCache) GetNodeinfos ¶
func (cache *SchedulerCache) GetNodeinfos() []*NodeInfo
func (*SchedulerCache) GetPod ¶
func (cache *SchedulerCache) GetPod(name, namespace string) (*v1.Pod, error)
func (*SchedulerCache) KnownPod ¶
func (cache *SchedulerCache) KnownPod(podUID types.UID) bool
Get known pod from the pod UID
func (*SchedulerCache) RemovePod ¶
func (cache *SchedulerCache) RemovePod(pod *v1.Pod)
The lock is in cacheNode
Click to show internal directories.
Click to hide internal directories.