engine

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(reg *registry.Registry, eStream *registry.EventStream, mach *machine.Machine) *Engine

func (*Engine) GetJobsScheduledToMachine

func (e *Engine) GetJobsScheduledToMachine(machID string) []job.Job

func (*Engine) LockMachine added in v0.1.2

func (e *Engine) LockMachine(machID string) *registry.TimedResourceMutex

Pass-through to Registry.LockMachine

func (*Engine) OfferJob

func (e *Engine) OfferJob(j job.Job) error

func (*Engine) RemoveUnitState added in v0.3.0

func (e *Engine) RemoveUnitState(jobName string)

func (*Engine) ResolveJobOffer

func (e *Engine) ResolveJobOffer(jobName string, machID string) error

func (*Engine) Run

func (e *Engine) Run()

func (*Engine) Stop

func (e *Engine) Stop()

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

func NewEventHandler

func NewEventHandler(engine *Engine) *EventHandler

func (*EventHandler) HandleCommandLoadJob added in v0.3.0

func (eh *EventHandler) HandleCommandLoadJob(ev event.Event)

func (*EventHandler) HandleCommandStopJob added in v0.3.0

func (eh *EventHandler) HandleCommandStopJob(ev event.Event)

func (*EventHandler) HandleCommandUnloadJob added in v0.3.0

func (eh *EventHandler) HandleCommandUnloadJob(ev event.Event)

func (*EventHandler) HandleEventJobBidSubmitted

func (eh *EventHandler) HandleEventJobBidSubmitted(ev event.Event)

func (*EventHandler) HandleEventJobScheduled added in v0.2.0

func (eh *EventHandler) HandleEventJobScheduled(ev event.Event)

func (*EventHandler) HandleEventJobUnscheduled added in v0.3.0

func (eh *EventHandler) HandleEventJobUnscheduled(ev event.Event)

EventJobUnscheduled is triggered when a scheduling decision has been rejected, or is now unfulfillable due to changes in the cluster. Attempt to reschedule the job if it is in a non-inactive state.

func (*EventHandler) HandleEventMachineCreated added in v0.2.0

func (eh *EventHandler) HandleEventMachineCreated(ev event.Event)

func (*EventHandler) HandleEventMachineRemoved

func (eh *EventHandler) HandleEventMachineRemoved(ev event.Event)

Jump to

Keyboard shortcuts

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