Documentation ¶
Overview ¶
Package podschedulers defines an interface (w/ implementations) for matching pods against offers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PodScheduler ¶
type PodScheduler interface { SchedulePod(r offers.Registry, task *podtask.T) (offers.Perishable, *podtask.Spec, error) Fit(*podtask.T, *mesosproto.Offer, *api.Node) bool }
SchedulePod is the interface which schedules pods. There can be different implementation for different scheduling policies.
SchedulePod accepts a set of offers and a single pod task, which aligns well with the k8s scheduling algorithm. It returns an offer that is acceptable for the pod, else nil. The caller is responsible for filling in task state w/ relevant offer details.
See the FCFSPodScheduler for example.
Fit checks whether a given podtask can be scheduled for the given offer on the given node.
func NewFCFSPodScheduler ¶
func NewFCFSPodScheduler(pr podtask.Procurement, lookupNode node.LookupFunc) PodScheduler
Click to show internal directories.
Click to hide internal directories.