This section is empty.


This section is empty.


This section is empty.


type Machine

type Machine struct {

	// contains filtered or unexported fields


Machine represents a juju machine as seen by a machiner worker.

func (*Machine) EnsureDead

func (m *Machine) EnsureDead() error

EnsureDead sets the machine lifecycle to Dead if it is Alive or Dying. It does nothing otherwise.

func (*Machine) Jobs

func (m *Machine) Jobs() (*params.JobsResult, error)

Jobs returns a list of jobs for the machine.

func (*Machine) Life

func (m *Machine) Life() life.Value

Life returns the machine's lifecycle value.

func (*Machine) RecordAgentStartTime

func (m *Machine) RecordAgentStartTime() error

RecordAgentStartTime updates the start time for the agent running on the machine.

func (*Machine) Refresh

func (m *Machine) Refresh() error

Refresh updates the cached local copy of the machine's data.

func (*Machine) SetMachineAddresses

func (m *Machine) SetMachineAddresses(addresses []network.MachineAddress) error

SetMachineAddresses sets the machine determined addresses of the machine.

func (*Machine) SetObservedNetworkConfig

func (m *Machine) SetObservedNetworkConfig(netConfig []params.NetworkConfig) error

SetObservedNetworkConfig sets the machine network config as observed on the machine.

func (*Machine) SetStatus

func (m *Machine) SetStatus(status status.Status, info string, data map[string]interface{}) error

SetStatus sets the status of the machine.

func (*Machine) Tag

func (m *Machine) Tag() names.Tag

Tag returns the machine's tag.

func (*Machine) Watch

func (m *Machine) Watch() (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to the machine.

type State

type State struct {
	*common.APIAddresser // contains filtered or unexported fields


State provides access to the Machiner API facade.

func NewState

func NewState(caller base.APICaller) *State

NewState creates a new client-side Machiner facade.

func (*State) Machine

func (st *State) Machine(tag names.MachineTag) (*Machine, error)

Machine provides access to methods of a state.Machine through the facade.