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.
Click to show internal directories.
Click to hide internal directories.