scheduler

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binder

type Binder interface {
	Bind(binding *api.Binding) error
}

Binder knows how to write a binding.

type Config

type Config struct {
	MinionLister scheduler.MinionLister
	Algorithm    scheduler.Scheduler
	Binder       Binder

	// NextPod should be a function that blocks until the next pod
	// is available. We don't use a channel for this, because scheduling
	// a pod may take some amount of time and we don't want pods to get
	// stale while they sit in a channel.
	NextPod func() *api.Pod

	// Error is called if there is an error. It is passed the pod in
	// question, and the error
	Error func(*api.Pod, error)
}

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler watches for new unscheduled pods. It attempts to find minions that they fit on and writes bindings back to the api server.

func New

func New(c *Config) *Scheduler

New returns a new scheduler.

func (*Scheduler) Run

func (s *Scheduler) Run()

Run begins watching and scheduling. It starts a goroutine and returns immediately.

Directories

Path Synopsis
This package is used to register algorithm provider plugins.
This package is used to register algorithm provider plugins.
affinity
This algorithm provider has predicates and priorities related to affinity/anti-affinity for the scheduler.
This algorithm provider has predicates and priorities related to affinity/anti-affinity for the scheduler.
defaults
This is the default algorithm provider for the scheduler.
This is the default algorithm provider for the scheduler.
Package factory can set up a scheduler.
Package factory can set up a scheduler.
Package server implements a Server object for running the scheduler.
Package server implements a Server object for running the scheduler.

Jump to

Keyboard shortcuts

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