kubernetes: github.com/igm/kubernetes/plugin/pkg/scheduler Index | Files | Directories

package scheduler

import "github.com/igm/kubernetes/plugin/pkg/scheduler"

Index

Package Files

scheduler.go

type Binder Uses

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

Binder knows how to write a binding.

type Config Uses

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 Uses

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 Uses

func New(c *Config) *Scheduler

New returns a new scheduler.

func (*Scheduler) Run Uses

func (s *Scheduler) Run()

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

Directories

PathSynopsis
factoryPackage factory can set up a scheduler.

Package scheduler imports 5 packages (graph). Updated 2018-05-04. Refresh now. Tools for package owners.