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 *clusterv1alpha1.Cluster) UpdateCluster(cluster *clusterv1alpha1.Cluster) DeleteCluster(cluster *clusterv1alpha1.Cluster) // Snapshot returns a snapshot of the current clusters info Snapshot() *Snapshot }
Cache is an interface for scheduler internal cache.
func NewCache ¶
func NewCache(clusterLister clusterlister.ClusterLister) Cache
NewCache instantiates a cache used only by scheduler.
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) GetCluster ¶ added in v0.9.0
func (s *Snapshot) GetCluster(clusterName string) *framework.ClusterInfo
GetCluster returns the given clusters.
func (*Snapshot) GetClusters ¶
func (s *Snapshot) GetClusters() []*framework.ClusterInfo
GetClusters returns all the clusters.
func (*Snapshot) GetReadyClusterNames ¶ added in v0.8.0
GetReadyClusterNames returns the clusterNames in ready status.
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.