algorithm

package
v0.0.0-...-1eb78b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScheduleOneSlice

func ScheduleOneSlice(slice *SliceInfo, snapshot *internalcache.NamespaceSchedSnapshot) (string, error)

func SchedulePod

func SchedulePod(pod *internalcache.Pod, snapshot *internalcache.PodSchedSnapshot) (string, error)

Types

type SliceInfo

type SliceInfo struct {
	Namespace string // namespace key
	Request   v1.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

func ScheduleNamespaceSlices

func ScheduleNamespaceSlices(slices SliceInfoArray, snapshot *internalcache.NamespaceSchedSnapshot) SliceInfoArray

func (*SliceInfoArray) Repeat

func (s *SliceInfoArray) Repeat(n int, namespace string, request v1.ResourceList, mandatory, hint string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL