provisioner

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2013 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDockBroker

func NewDockBroker(config *config.Config, tools *tools.Tools) environs.InstanceBroker

Types

type MachineGetter

type MachineGetter interface {
	Machine(id string) (*state.Machine, error)
}

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

Provisioner represents a running provisioning worker.

func NewProvisioner

func NewProvisioner(pt ProvisionerType, st *state.State, machineId, dataDir string) *Provisioner

NewProvisioner returns a new Provisioner. When new machines are added to the state, it allocates instances from the environment and allocates them to the new machines.

func (*Provisioner) Err

func (p *Provisioner) Err() (reason error)

Err returns the reason why the Provisioner has stopped or tomb.ErrStillAlive when it is still alive.

func (*Provisioner) Kill

func (p *Provisioner) Kill()

Kill implements worker.Worker.Kill.

func (*Provisioner) Stop

func (p *Provisioner) Stop() error

Stop stops the Provisioner and returns any error encountered while provisioning.

func (*Provisioner) String

func (p *Provisioner) String() string

func (*Provisioner) Wait

func (p *Provisioner) Wait() error

Wait implements worker.Worker.Wait.

type ProvisionerTask

type ProvisionerTask interface {
	worker.Worker
	Stop() error
	Dying() <-chan struct{}
	Err() error
}

func NewProvisionerTask

func NewProvisionerTask(
	machineId string,
	machineGetter MachineGetter,
	watcher Watcher,
	broker environs.InstanceBroker,
	auth AuthenticationProvider,
) ProvisionerTask

type ProvisionerType

type ProvisionerType string
var (

	// ENVIRON provisioners create machines from the environment
	ENVIRON ProvisionerType = "environ"
	// LXC provisioners create lxc containers on their parent machine
	LXC  ProvisionerType = "lxc"
	DOCK ProvisionerType = "dock"
)

type Watcher

type Watcher interface {
	watcher.Errer
	watcher.Stopper
	Changes() <-chan []string
}

Jump to

Keyboard shortcuts

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