Documentation ¶
Index ¶
- type Machine
- func (m *Machine) Constraints() (constraints.Value, error)
- func (m *Machine) EnsureDead() error
- func (m *Machine) Id() string
- func (m *Machine) InstanceId() (instance.Id, error)
- func (m *Machine) Life() params.Life
- func (m *Machine) Refresh() error
- func (m *Machine) Remove() error
- func (m *Machine) Series() (string, error)
- func (m *Machine) SetPassword(password string) error
- func (m *Machine) SetProvisioned(id instance.Id, nonce string, ...) error
- func (m *Machine) SetStatus(status params.Status, info string) error
- func (m *Machine) SetSupportedContainers(containerTypes ...instance.ContainerType) error
- func (m *Machine) Status() (params.Status, string, error)
- func (m *Machine) String() string
- func (m *Machine) SupportsNoContainers() error
- func (m *Machine) Tag() string
- func (m *Machine) WatchAllContainers() (watcher.StringsWatcher, error)
- func (m *Machine) WatchContainers(ctype instance.ContainerType) (watcher.StringsWatcher, error)
- type State
- func (st *State) APIAddresses() ([]string, error)
- func (st *State) CACert() ([]byte, error)
- func (st *State) ContainerConfig() (result params.ContainerConfig, err error)
- func (st *State) Machine(tag string) (*Machine, error)
- func (st *State) StateAddresses() ([]string, error)
- func (st *State) Tools(tag string) (*tools.Tools, error)
- func (st *State) WatchEnvironMachines() (watcher.StringsWatcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine represents a juju machine as seen by the provisioner worker.
func (*Machine) Constraints ¶
func (m *Machine) Constraints() (constraints.Value, error)
Constraints returns the exact constraints that should apply when provisioning an instance for the machine.
func (*Machine) EnsureDead ¶
EnsureDead sets the machine lifecycle to Dead if it is Alive or Dying. It does nothing otherwise.
func (*Machine) InstanceId ¶
InstanceId returns the provider specific instance id for the machine or an CodeNotProvisioned error, if not set.
func (*Machine) Remove ¶
Remove removes the machine from state. It will fail if the machine is not Dead.
func (*Machine) Series ¶
Series returns the operating system series running on the machine.
NOTE: Unlike state.Machine.Series(), this method returns an error as well, because it needs to do an API call.
func (*Machine) SetPassword ¶
SetPassword sets the machine's password.
func (*Machine) SetProvisioned ¶
func (m *Machine) SetProvisioned(id instance.Id, nonce string, characteristics *instance.HardwareCharacteristics) error
SetProvisioned sets the provider specific machine id, nonce and also metadata for this machine. Once set, the instance id cannot be changed.
func (*Machine) SetSupportedContainers ¶
func (m *Machine) SetSupportedContainers(containerTypes ...instance.ContainerType) error
SetSupportedContainers updates the list of containers supported by this machine.
func (*Machine) SupportsNoContainers ¶
SupportsNoContainers records the fact that this machine doesn't support any containers.
func (*Machine) WatchAllContainers ¶
func (m *Machine) WatchAllContainers() (watcher.StringsWatcher, error)
WatchAllContainers returns a StringsWatcher that notifies of changes to the lifecycles of all containers on the machine.
func (*Machine) WatchContainers ¶
func (m *Machine) WatchContainers(ctype instance.ContainerType) (watcher.StringsWatcher, error)
WatchContainers returns a StringsWatcher that notifies of changes to the lifecycles of containers of the specified type on the machine.
type State ¶
type State struct { *common.EnvironWatcher // contains filtered or unexported fields }
State provides access to the Machiner API facade.
func (*State) APIAddresses ¶
APIAddresses returns the list of addresses used to connect to the API.
func (*State) ContainerConfig ¶
func (st *State) ContainerConfig() (result params.ContainerConfig, err error)
ContainerConfig returns information from the environment config that are needed for container cloud-init.
func (*State) StateAddresses ¶
StateAddresses returns the list of addresses used to connect to the state.
func (*State) WatchEnvironMachines ¶
func (st *State) WatchEnvironMachines() (watcher.StringsWatcher, error)
WatchEnvironMachines returns a StringsWatcher that notifies of changes to the lifecycles of the machines (but not containers) in the current environment.