envworkermanager

package
v0.0.0-...-be26699 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 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,
	startEnvWorker func(InitialState, *state.State) (worker.Worker, error),
) worker.Worker

NewEnvWorkerManager returns a Worker which manages a worker which needs to run on a per environment basis. It takes a function which will be called to start a worker for a new environment. This worker 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 startEnvWorker 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