Documentation ¶
Index ¶
- type Client
- type Machine
- func (m *Machine) CharmProfilingInfo() (*UnitProfileInfo, error)
- func (m *Machine) ContainerType() (instance.ContainerType, error)
- func (m *Machine) InstanceId() (string, error)
- func (m *Machine) Life() life.Value
- func (m *Machine) Refresh() error
- func (m *Machine) SetCharmProfiles(profiles []string) error
- func (m *Machine) SetModificationStatus(status status.Status, info string, data map[string]interface{}) error
- func (m *Machine) Tag() names.MachineTag
- func (m *Machine) WatchContainers() (watcher.StringsWatcher, error)
- func (m *Machine) WatchLXDProfileVerificationNeeded() (watcher.NotifyWatcher, error)
- func (m *Machine) WatchUnits() (watcher.StringsWatcher, error)
- type MutaterMachine
- type UnitProfileChanges
- type UnitProfileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromFacade ¶
func NewClientFromFacade(facadeCaller base.FacadeCaller) *Client
NewStateFromFacade creates a new instance mutater facade using the input facade caller.
func (*Client) Machine ¶
func (c *Client) Machine(tag names.MachineTag) (MutaterMachine, error)
Machine provides access to methods of a state.Machine through the facade.
func (*Client) WatchMachines ¶
func (c *Client) WatchMachines() (watcher.StringsWatcher, error)
WatchMachines returns a StringsWatcher reporting changes to machines.
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine represents a juju machine as seen by an instancemutater worker.
func (*Machine) CharmProfilingInfo ¶
func (m *Machine) CharmProfilingInfo() (*UnitProfileInfo, error)
CharmProfilingInfo implements MutaterMachine.CharmProfilingInfo.
func (*Machine) ContainerType ¶
func (m *Machine) ContainerType() (instance.ContainerType, error)
ContainerType implements MutaterMachine.ContainerType.
func (*Machine) InstanceId ¶
InstanceId implements MutaterMachine.InstanceId.
func (*Machine) SetCharmProfiles ¶
SetCharmProfiles implements MutaterMachine.SetCharmProfiles.
func (*Machine) SetModificationStatus ¶
func (m *Machine) SetModificationStatus(status status.Status, info string, data map[string]interface{}) error
SetModificationStatus implements MutaterMachine.SetModificationStatus.
func (*Machine) WatchContainers ¶
func (m *Machine) WatchContainers() (watcher.StringsWatcher, error)
WatchContainers returns a StringsWatcher reporting changes to containers.
func (*Machine) WatchLXDProfileVerificationNeeded ¶
func (m *Machine) WatchLXDProfileVerificationNeeded() (watcher.NotifyWatcher, error)
WatchLXDProfileVerificationNeeded implements MutaterMachine.WatchLXDProfileVerificationNeeded.
func (*Machine) WatchUnits ¶
func (m *Machine) WatchUnits() (watcher.StringsWatcher, error)
WatchUnits implements MutaterMachine.WatchUnits.
type MutaterMachine ¶
type MutaterMachine interface { // InstanceId returns the provider specific instance id for this machine InstanceId() (string, error) // CharmProfilingInfo returns info to update lxd profiles on the machine CharmProfilingInfo() (*UnitProfileInfo, error) // ContainerType returns the container type for this machine. ContainerType() (instance.ContainerType, error) // SetCharmProfiles records the given slice of charm profile names. SetCharmProfiles([]string) error // Tag returns the current machine tag Tag() names.MachineTag // Life returns the machine's lifecycle value. Life() life.Value // Refresh updates the cached local copy of the machine's data. Refresh() error // WatchUnits returns a watcher.StringsWatcher for watching units of a given // machine. WatchUnits() (watcher.StringsWatcher, error) // WatchLXDProfileVerificationNeeded returns a NotifyWatcher, notifies when the // following changes happen: // - application charm URL changes and there is a lxd profile // - unit is add or removed and there is a lxd profile WatchLXDProfileVerificationNeeded() (watcher.NotifyWatcher, error) // WatchContainers returns a watcher.StringsWatcher for watching // containers of a given machine. WatchContainers() (watcher.StringsWatcher, error) // SetModificationStatus sets the provider specific modification status // for a machine. Allowing the propagation of status messages to the // operator. SetModificationStatus(status status.Status, info string, data map[string]interface{}) error }
type UnitProfileChanges ¶
type UnitProfileChanges struct { ApplicationName string Revision int Profile lxdprofile.Profile }
type UnitProfileInfo ¶
type UnitProfileInfo struct { ModelName string InstanceId instance.Id ProfileChanges []UnitProfileChanges CurrentProfiles []string }