queuer

package
v1.2.0-alpha.3....-fa5c014 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2015 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

	Delay  *time.Duration
	Notify queue.BreakChan
	// contains filtered or unexported fields
}

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

func NewPodWithDeadline

func NewPodWithDeadline(pod *api.Pod, deadline *time.Time) *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 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