Documentation ¶
Index ¶
- type Cache
- type ClusterStateCache
- func (sc *ClusterStateCache) AddNode(obj interface{})
- func (sc *ClusterStateCache) AddPDB(obj interface{})
- func (sc *ClusterStateCache) AddPod(obj interface{})
- func (sc *ClusterStateCache) AddSchedulingSpec(obj interface{})
- func (sc *ClusterStateCache) DeleteNode(obj interface{})
- func (sc *ClusterStateCache) DeletePDB(obj interface{})
- func (sc *ClusterStateCache) DeletePod(obj interface{})
- func (sc *ClusterStateCache) DeleteSchedulingSpec(obj interface{})
- func (sc *ClusterStateCache) GetResourceCapacities() *api.Resource
- func (sc *ClusterStateCache) GetUnallocatedResources() *api.Resource
- func (sc *ClusterStateCache) LoadConf(path string) (map[string]string, error)
- func (sc *ClusterStateCache) Run(stopCh <-chan struct{})
- func (sc *ClusterStateCache) Snapshot() *api.ClusterInfo
- func (sc *ClusterStateCache) String() string
- func (sc *ClusterStateCache) UpdateNode(oldObj, newObj interface{})
- func (sc *ClusterStateCache) UpdatePDB(oldObj, newObj interface{})
- func (sc *ClusterStateCache) UpdatePod(oldObj, newObj interface{})
- func (sc *ClusterStateCache) UpdateSchedulingSpec(oldObj, newObj interface{})
- func (sc *ClusterStateCache) WaitForCacheSync(stopCh <-chan struct{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Run start informer Run(stopCh <-chan struct{}) // Snapshot deep copy overall cache information into snapshot Snapshot() *api.ClusterInfo // SchedulerConf return the property of scheduler configuration LoadConf(path string) (map[string]string, error) // WaitForCacheSync waits for all cache synced WaitForCacheSync(stopCh <-chan struct{}) bool // Obtains current cluster unallocated resources. GetUnallocatedResources() *api.Resource }
Cache collects pods/nodes/queues information and provides information snapshot
type ClusterStateCache ¶
type ClusterStateCache struct { sync.Mutex Jobs map[api.JobID]*api.JobInfo Nodes map[string]*api.NodeInfo // contains filtered or unexported fields }
func (*ClusterStateCache) AddNode ¶
func (sc *ClusterStateCache) AddNode(obj interface{})
func (*ClusterStateCache) AddPDB ¶
func (sc *ClusterStateCache) AddPDB(obj interface{})
func (*ClusterStateCache) AddPod ¶
func (sc *ClusterStateCache) AddPod(obj interface{})
func (*ClusterStateCache) AddSchedulingSpec ¶
func (sc *ClusterStateCache) AddSchedulingSpec(obj interface{})
func (*ClusterStateCache) DeleteNode ¶
func (sc *ClusterStateCache) DeleteNode(obj interface{})
func (*ClusterStateCache) DeletePDB ¶
func (sc *ClusterStateCache) DeletePDB(obj interface{})
func (*ClusterStateCache) DeletePod ¶
func (sc *ClusterStateCache) DeletePod(obj interface{})
func (*ClusterStateCache) DeleteSchedulingSpec ¶
func (sc *ClusterStateCache) DeleteSchedulingSpec(obj interface{})
func (*ClusterStateCache) GetResourceCapacities ¶
func (sc *ClusterStateCache) GetResourceCapacities() *api.Resource
Gets the full capacity of resources in the cluster
func (*ClusterStateCache) GetUnallocatedResources ¶
func (sc *ClusterStateCache) GetUnallocatedResources() *api.Resource
Gets available free resoures.
func (*ClusterStateCache) LoadConf ¶
func (sc *ClusterStateCache) LoadConf(path string) (map[string]string, error)
func (*ClusterStateCache) Run ¶
func (sc *ClusterStateCache) Run(stopCh <-chan struct{})
func (*ClusterStateCache) Snapshot ¶
func (sc *ClusterStateCache) Snapshot() *api.ClusterInfo
func (*ClusterStateCache) String ¶
func (sc *ClusterStateCache) String() string
func (*ClusterStateCache) UpdateNode ¶
func (sc *ClusterStateCache) UpdateNode(oldObj, newObj interface{})
func (*ClusterStateCache) UpdatePDB ¶
func (sc *ClusterStateCache) UpdatePDB(oldObj, newObj interface{})
func (*ClusterStateCache) UpdatePod ¶
func (sc *ClusterStateCache) UpdatePod(oldObj, newObj interface{})
func (*ClusterStateCache) UpdateSchedulingSpec ¶
func (sc *ClusterStateCache) UpdateSchedulingSpec(oldObj, newObj interface{})
func (*ClusterStateCache) WaitForCacheSync ¶
func (sc *ClusterStateCache) WaitForCacheSync(stopCh <-chan struct{}) bool
Click to show internal directories.
Click to hide internal directories.