modelworkermanager

package
v0.0.0-...-2608902 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) (worker.Worker, error)

Types

type Backend

type Backend interface {
	WatchModels() state.StringsWatcher
}

Backend defines the State functionality used by the manager worker.

type Config

type Config struct {
	Backend    Backend
	NewWorker  NewWorkerFunc
	ErrorDelay time.Duration
}

Config holds the dependencies and configuration necessary to run a model worker manager.

func (Config) Validate

func (config Config) Validate() error

Validate returns an error if config cannot be expected to drive a functional model worker manager.

type NewWorkerFunc

type NewWorkerFunc func(modelUUID string) (worker.Worker, error)

NewWorkerFunc should return a worker responsible for running all a model's required workers; and for returning nil when there's no more model to manage.

Jump to

Keyboard shortcuts

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