envworkermanager

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnvWorkerManager

func NewEnvWorkerManager(
	st InitialState,
	startEnvWorkers func(InitialState, *state.State) (worker.Runner, error),
) worker.Worker

NewEnvWorkerManager returns a Worker which manages the workers which need to run on a per environment basis. It takes a function which will be called to start workers for a new environment. These workers will be killed when an environment goes away.

Types

type InitialState

type InitialState interface {
	WatchEnvironments() state.StringsWatcher
	ForEnviron(names.EnvironTag) (*state.State, error)
	GetEnvironment(names.EnvironTag) (*state.Environment, error)
	EnvironUUID() string
	Machine(string) (*state.Machine, error)
	MongoSession() *mgo.Session
}

InitialState defines the State functionality used by envWorkerManager and/or could be useful to startEnvWorkers funcs. It mainly exists to support testing.

Jump to

Keyboard shortcuts

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