Documentation ¶
Index ¶
- func Equals(a v1.ResourceList, b v1.ResourceList) bool
- func GetLeastFitSliceNum(quota, quotaSlice v1.ResourceList) (int, error)
- func MaxAlloc(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
- type Cache
- type Cluster
- func (c *Cluster) AddNamespace(key string, slices []*Slice) error
- func (c *Cluster) AddPod(pod *Pod) error
- func (c *Cluster) AddProvision(key string, slices []*Slice) error
- func (c *Cluster) DeepCopy() *Cluster
- func (c *Cluster) Dump() string
- func (c *Cluster) RemoveNamespace(key string) error
- func (c *Cluster) RemovePod(pod *Pod)
- func (c *Cluster) RemoveProvision(key string) error
- type ClusterUsage
- type Namespace
- func (n *Namespace) Comparable(in *Namespace) bool
- func (n *Namespace) DeepCopy() *Namespace
- func (n *Namespace) Dump() string
- func (n *Namespace) GetKey() string
- func (n *Namespace) GetPlacementMap() map[string]int
- func (n *Namespace) GetQuotaSlice() v1.ResourceList
- func (n *Namespace) GetTotalSlices() int
- func (n *Namespace) SetNewPlacements(p map[string]int)
- type NamespaceSchedSnapshot
- type Placement
- type Pod
- type PodSchedSnapshot
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equals ¶
func Equals(a v1.ResourceList, b v1.ResourceList) bool
func GetLeastFitSliceNum ¶
func GetLeastFitSliceNum(quota, quotaSlice v1.ResourceList) (int, error)
func MaxAlloc ¶
func MaxAlloc(a v1.ResourceList, b v1.ResourceList) v1.ResourceList
Types ¶
type Cache ¶
type Cache interface { AddTenant(string) RemoveTenant(string) error GetNamespace(string) *Namespace AddNamespace(*Namespace) error RemoveNamespace(*Namespace) error UpdateNamespace(*Namespace, *Namespace) error AddCluster(*Cluster) error RemoveCluster(string) error GetPod(string) *Pod AddPod(*Pod) error RemovePod(*Pod) error AddProvision(string, string, []*Slice) error RemoveProvision(string, string) error UpdateClusterCapacity(string, v1.ResourceList) error SnapshotForNamespaceSched(...*Namespace) (*NamespaceSchedSnapshot, error) SnapshotForPodSched(pod *Pod) (*PodSchedSnapshot, error) Dump() string }
func NewSchedulerCache ¶
func NewSchedulerCache(stop <-chan struct{}) Cache
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) RemoveNamespace ¶
func (*Cluster) RemoveProvision ¶
type ClusterUsage ¶
type ClusterUsage struct {
// contains filtered or unexported fields
}
func (*ClusterUsage) GetCapacity ¶
func (u *ClusterUsage) GetCapacity() v1.ResourceList
func (*ClusterUsage) GetMaxAlloc ¶
func (u *ClusterUsage) GetMaxAlloc() v1.ResourceList
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func NewNamespace ¶
func (*Namespace) Comparable ¶
func (*Namespace) GetPlacementMap ¶
func (*Namespace) GetQuotaSlice ¶
func (n *Namespace) GetQuotaSlice() v1.ResourceList
func (*Namespace) GetTotalSlices ¶
func (*Namespace) SetNewPlacements ¶
type NamespaceSchedSnapshot ¶
type NamespaceSchedSnapshot struct {
// contains filtered or unexported fields
}
func NewNamespaceSchedSnapshot ¶
func NewNamespaceSchedSnapshot() *NamespaceSchedSnapshot
func (*NamespaceSchedSnapshot) AddSlices ¶
func (s *NamespaceSchedSnapshot) AddSlices(slices []*Slice) error
func (*NamespaceSchedSnapshot) GetClusterUsageMap ¶
func (s *NamespaceSchedSnapshot) GetClusterUsageMap() map[string]*ClusterUsage
func (*NamespaceSchedSnapshot) RemoveSlices ¶
func (s *NamespaceSchedSnapshot) RemoveSlices(slices []*Slice) error
type Placement ¶
type Placement struct {
// contains filtered or unexported fields
}
func NewPlacement ¶
func (*Placement) GetCluster ¶
func (Placement) MarshalJSON ¶
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
func (*Pod) GetCluster ¶
func (*Pod) GetNamespaceKey ¶
func (*Pod) GetRequest ¶
func (p *Pod) GetRequest() v1.ResourceList
func (*Pod) SetCluster ¶
type PodSchedSnapshot ¶
type PodSchedSnapshot struct {
// contains filtered or unexported fields
}
func NewPodSchedSnapshot ¶
func NewPodSchedSnapshot() *PodSchedSnapshot
func (*PodSchedSnapshot) AddUsage ¶
func (s *PodSchedSnapshot) AddUsage(cluster string, usage v1.ResourceList) error
func (*PodSchedSnapshot) GetClusterUsageMap ¶
func (s *PodSchedSnapshot) GetClusterUsageMap() map[string]*ClusterUsage
type Slice ¶
type Slice struct {
// contains filtered or unexported fields
}
func (Slice) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.