package queuer

import "k8s.io/kubernetes/contrib/mesos/pkg/scheduler/queuer"

Package queuer implements a Pod Queuer which stores and yields pods waiting being scheduled.

Index

Types

type Pod

type Pod struct {
	*api.Pod
	// contains filtered or unexported fields
}

wrapper for the k8s pod type so that we can define additional methods on a "pod"

func NewPod

func NewPod(pod *api.Pod, opt ...PodOpt) *Pod

func (*Pod) Breaker

func (p *Pod) Breaker() queue.BreakChan

func (*Pod) Copy

func (p *Pod) Copy() queue.Copyable

implements Copyable

func (*Pod) Deadline

func (dp *Pod) Deadline() (time.Time, bool)

implements Deadlined

func (*Pod) GetDelay

func (dp *Pod) GetDelay() time.Duration

func (*Pod) GetUID

func (p *Pod) GetUID() string

implements Unique

func (*Pod) String

func (p *Pod) String() string

type PodOpt

type PodOpt func(*Pod)

functional Pod option

func Deadline

func Deadline(deadline time.Time) PodOpt

Deadline sets the deadline for a Pod

func Delay

func Delay(delay time.Duration) PodOpt

Delay sets the delay for a Pod

func Notify

func Notify(notify queue.BreakChan) PodOpt

Notify sets the breakout notification channel for a Pod

type Queuer

type Queuer interface {
	InstallDebugHandlers(mux *http.ServeMux)
	UpdatesAvailable()
	Dequeue(id string)
	Requeue(pod *Pod)
	Reoffer(pod *Pod)

	Yield() *api.Pod

	Run(done <-chan struct{})
}

func New

func New(queue *queue.DelayFIFO, updates queue.FIFO) Queuer

Source Files

doc.go pod.go queuer.go

Version
v1.4.4
Published
Oct 21, 2016
Platform
linux/amd64
Imports
11 packages
Last checked
1 minute ago

Tools for package owners.