kubernetesk8s.io/kubernetes/plugin/pkg/scheduler Index | Files | Directories

package scheduler

import "k8s.io/kubernetes/plugin/pkg/scheduler"

Index

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.

Source Files

scheduler.go

Directories

PathSynopsis
plugin/pkg/scheduler/algorithmproviderThis package is used to register algorithm provider plugins.
plugin/pkg/scheduler/algorithmprovider/defaultsThis is the default algorithm provider for the scheduler.
plugin/pkg/scheduler/factoryPackage factory can set up a scheduler.
Version
v0.8.0
Published
Jan 7, 2015
Platform
js/wasm
Imports
5 packages
Last checked
30 seconds ago

Tools for package owners.