Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScheduleOneSlice ¶
func ScheduleOneSlice(slice *SliceInfo, snapshot *internalcache.NamespaceSchedSnapshot) (string, error)
ScheduleOneSlice checks snapshot and returns cluster than that fits the slice
func SchedulePod ¶
func SchedulePod(pod *internalcache.Pod, snapshot *internalcache.PodSchedSnapshot) (string, error)
SchedulePod checks snapshot and returns cluster name that fits the pod
Types ¶
type SliceInfo ¶
type SliceInfo struct { Namespace string // namespace key Request corev1.ResourceList Mandatory string // if not empty, it is the cluster that the slice should go if all checks are passed Hint string // if not empty, it is the preferred cluster Result string // scheduled cluster name Err error }
SliceInfo is the input to the algorithm.
type SliceInfoArray ¶
type SliceInfoArray []*SliceInfo
SliceInfoArray is the list of SliceInfo.
func ScheduleNamespaceSlices ¶
func ScheduleNamespaceSlices(slices SliceInfoArray, snapshot *internalcache.NamespaceSchedSnapshot) SliceInfoArray
ScheduleNamespaceSlices applies ScheduleOneSlice for each slice
func (*SliceInfoArray) Repeat ¶
func (s *SliceInfoArray) Repeat(n int, namespace string, request corev1.ResourceList, mandatory, hint string)
Repeat adds the request to SliceInfoArray one more time.
Click to show internal directories.
Click to hide internal directories.