Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAction(name string, creator NewAction)
- func RegisterConfStore(name string, creator NewConfStore)
- func RegisterConfigDecoder(name string, cd ConfigDecoder)
- func RegisterContainerRuntime(name string, creator NewContainerRuntime)
- func RegisterReaction(name string, creator NewReaction)
- type Action
- type Command
- type Commander
- type ConfStore
- type Config
- type ConfigDecoder
- type Container
- type ContainerData
- type ContainerNetwork
- type ContainerRuntime
- type Engine
- func (e *Engine) DeregisterContainer(name string) error
- func (e *Engine) Event(cmd *Command) error
- func (e *Engine) Initialize() error
- func (e *Engine) RegisterContainer(name string, c Container) error
- func (e *Engine) Restart() error
- func (e *Engine) SetConfigFile(cfgfile string) error
- func (e *Engine) Start() error
- func (e *Engine) State() error
- func (e *Engine) Stop() error
- type Event
- type NameSpace
- type NewAction
- type NewConfStore
- type NewContainerRuntime
- type NewReaction
- type Port
- type Published
- type Reaction
- type Setup
- type StartStop
Constants ¶
const LatestHashVersion = 1
Latest version of our hash TODO: should auto calculate...
Variables ¶
var ErrCircularDependency = errors.New("circular dependecy detected")
ErrCircularDependency ...
var ErrConfigDecoderFailed = errors.New("config decoder failed")
ErrConfigDecoderFailed
var ErrInvalidPayload = errors.New("not a valid payload")
ErrInvalidPayload ...
var ErrLoopDetected = errors.New("loop detected")
ErrLoopDetected
var ErrNoConfigDecoder = errors.New("config entry has no config decoder")
ErrNoConfigDecoder
var ErrNoContainerRuntime = errors.New("no container runtime started")
ErrNoContainerRuntime ...
var ErrNotAConfig = errors.New("not a config object")
ErrNotAConfig ...
var ErrNotAConfigStructure = errors.New("not a propper structure")
ErrNotAConfigStructure
var ErrNotAValidConfig = errors.New("not a valid config")
ErrNotAValidConfig ...
var ErrNotAllowed = errors.New("action not allowed")
ErrNotAllowed ...
var ErrUnknownEvent = errors.New("unknown event")
ErrUnknownEvent ...
Functions ¶
func RegisterAction ¶
RegisterAction is called to register an Action object
func RegisterConfStore ¶
func RegisterConfStore(name string, creator NewConfStore)
RegisterConfStore registers a ConfStore with the engine.
func RegisterConfigDecoder ¶
func RegisterConfigDecoder(name string, cd ConfigDecoder)
RegisterConfigDecoder registers a ConfigDecoder with the engine.
func RegisterContainerRuntime ¶
func RegisterContainerRuntime(name string, creator NewContainerRuntime)
RegisterContainerRuntime is called to register a ContainerRuntime object
func RegisterReaction ¶
func RegisterReaction(name string, creator NewReaction)
RegisterReaction is called to register a Reaction object
Types ¶
type ConfigDecoder ¶
ConfigDecoder is an interface to parsing and validating configuration data
type ContainerData ¶
type ContainerData struct { ID string Name string Created time.Time // Args []string Network *ContainerNetwork }
ContainerData holds information about a container for communicating with modules.
func NewContainerData ¶
func NewContainerData() *ContainerData
NewContainerData returns an empty ContainerData object.
type ContainerNetwork ¶
type ContainerNetwork struct { IPAddress string Mask int Ports []Port Published map[Port][]Published Hostname string Domainname string DNS []string }
ContainerNetwork holds network information about a container.
type ContainerRuntime ¶
ContainerRuntime is the interface for the container runtine object.
type Engine ¶
type Engine struct { Config map[string]Config ContainerRuntime ContainerRuntime ContainerList map[string]Container FileStore ConfStore ConfStore ConfStore Action map[string]Action Reaction map[string]Reaction // contains filtered or unexported fields }
Engine is the heart of stacker, it runs everything.
func (*Engine) DeregisterContainer ¶
DeregisterContainer registers an action on the container list
func (*Engine) RegisterContainer ¶
RegisterContainer registers an container on the container list
func (*Engine) SetConfigFile ¶
SetConfigFile sets the path to the config file
type NewAction ¶
type NewAction func() (a Action)
NewAction is a function definition each Action must provide
type NewConfStore ¶
type NewConfStore func() (c ConfStore)
NewConfStore is a function definition each ConfStore must provide
type NewContainerRuntime ¶
type NewContainerRuntime func() (c ContainerRuntime)
NewContainerRuntime is a function definition each Docker must provide
type NewReaction ¶
type NewReaction func() (r Reaction)
NewReaction is a function definition each Reaction must provide