podschedulers

package
v1.2.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: Apache-2.0 Imports: 6 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 AllocationStrategy

type AllocationStrategy interface {
	// FitPredicate returns the selector used to determine pod fitness w/ respect to a given offer
	FitPredicate() podtask.FitPredicate

	// Procurement returns a func that obtains resources for a task from resource offer
	Procurement() podtask.Procurement
}

func NewAllocationStrategy

func NewAllocationStrategy(fitPredicate podtask.FitPredicate, procurement podtask.Procurement) AllocationStrategy

type PodScheduler

type PodScheduler interface {
	AllocationStrategy

	// SchedulePod implements how to schedule pods among slaves.
	// We can have different implementation for different scheduling policy.
	//
	// The function accepts a set of offers and a single pod, which aligns well
	// with the k8s scheduling algorithm. It returns an offerId that is acceptable
	// for the pod, otherwise nil. The caller is responsible for filling in task
	// state w/ relevant offer details.
	//
	// See the FCFSPodScheduler for example.
	SchedulePod(r offers.Registry, task *podtask.T) (offers.Perishable, error)
}

func NewFCFSPodScheduler

func NewFCFSPodScheduler(as AllocationStrategy, lookupNode node.LookupFunc) PodScheduler

Jump to

Keyboard shortcuts

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