podschedulers

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

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