Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { AddCluster(cluster *v1alpha1.Cluster) UpdateCluster(cluster *v1alpha1.Cluster) DeleteCluster(cluster *v1alpha1.Cluster) // Snapshot returns a snapshot of the current clusters info Snapshot() *Snapshot }
Cache is an interface for scheduler internal cache.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is a snapshot of cache ClusterInfo. The scheduler takes a snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle.
func NewEmptySnapshot ¶
func NewEmptySnapshot() *Snapshot
NewEmptySnapshot initializes a Snapshot struct and returns it.
func (*Snapshot) GetClusters ¶
func (s *Snapshot) GetClusters() []*framework.ClusterInfo
GetClusters returns all the clusters.
func (*Snapshot) GetReadyClusters ¶ added in v0.3.0
func (s *Snapshot) GetReadyClusters() []*framework.ClusterInfo
GetReadyClusters returns the clusters in ready status.
func (*Snapshot) NumOfClusters ¶
NumOfClusters returns the number of clusters.
Click to show internal directories.
Click to hide internal directories.