queuer

package
v1.3.2-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

Jump to

Keyboard shortcuts

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