machiner

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: 11 Imported by: 0

Documentation

Overview

Copyright 2012, 2013 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.

Copyright 2015 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMachiner

func NewMachiner(st MachineAccessor, agentConfig agent.Config) worker.Worker

NewMachiner returns a Worker that will wait for the identified machine to become Dying and make it Dead; or until the machine becomes Dead by other means.

Types

type APIMachineAccessor

type APIMachineAccessor struct {
	State *machiner.State
}

func (APIMachineAccessor) Machine

func (a APIMachineAccessor) Machine(tag names.MachineTag) (Machine, error)

type Machine

type Machine interface {
	Refresh() error
	Life() params.Life
	EnsureDead() error
	SetMachineAddresses(addresses []network.Address) error
	SetStatus(status params.Status, info string, data map[string]interface{}) error
	Watch() (watcher.NotifyWatcher, error)
}

type MachineAccessor

type MachineAccessor interface {
	Machine(names.MachineTag) (Machine, error)
}

type Machiner

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

Machiner is responsible for a machine agent's lifecycle.

func (*Machiner) Handle

func (mr *Machiner) Handle(_ <-chan struct{}) error

func (*Machiner) SetUp

func (mr *Machiner) SetUp() (watcher.NotifyWatcher, error)

func (*Machiner) TearDown

func (mr *Machiner) TearDown() error

Jump to

Keyboard shortcuts

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