Documentation ¶
Index ¶
- type Application
- type Machine
- func (m *Machine) ActiveSubnets() ([]names.SubnetTag, error)
- func (m *Machine) InstanceId() (instance.Id, error)
- func (m *Machine) Life() params.Life
- func (m *Machine) OpenedPorts(subnetTag names.SubnetTag) (map[network.PortRange]names.UnitTag, error)
- func (m *Machine) Tag() names.MachineTag
- func (m *Machine) WatchUnits() (watcher.StringsWatcher, error)
- type State
- func (st *State) BestAPIVersion() int
- func (st *State) Machine(tag names.MachineTag) (*Machine, error)
- func (st *State) ModelTag() (names.ModelTag, bool)
- func (st *State) Unit(tag names.UnitTag) (*Unit, error)
- func (st *State) WatchModelMachines() (watcher.StringsWatcher, error)
- func (st *State) WatchOpenedPorts() (watcher.StringsWatcher, error)
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Service represents the state of a service.
func (*Application) IsExposed ¶
func (s *Application) IsExposed() (bool, error)
IsExposed returns whether this service is exposed. The explicitly open ports (with open-port) for exposed services may be accessed from machines outside of the local deployment network.
NOTE: This differs from state.Service.IsExposed() by returning an error as well, because it needs to make an API call.
func (*Application) Life ¶
func (s *Application) Life() params.Life
Life returns the service's current life state.
func (*Application) Refresh ¶
func (s *Application) Refresh() error
Refresh refreshes the contents of the Service from the underlying state.
func (*Application) Tag ¶
func (s *Application) Tag() names.ApplicationTag
Tag returns the service tag.
func (*Application) Watch ¶
func (s *Application) Watch() (watcher.NotifyWatcher, error)
Watch returns a watcher for observing changes to a service.
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine represents a juju machine as seen by the firewaller worker.
func (*Machine) ActiveSubnets ¶
ActiveSubnets returns a list of subnet tags for which the machine has opened ports.
func (*Machine) InstanceId ¶
InstanceId returns the provider specific instance id for this machine, or a CodeNotProvisioned error, if not set.
func (*Machine) OpenedPorts ¶
func (m *Machine) OpenedPorts(subnetTag names.SubnetTag) (map[network.PortRange]names.UnitTag, error)
OpenedPorts returns a map of network.PortRange to unit tag for all opened port ranges on the machine for the subnet matching given subnetTag.
func (*Machine) WatchUnits ¶
func (m *Machine) WatchUnits() (watcher.StringsWatcher, error)
WatchUnits starts a StringsWatcher to watch all units assigned to the machine.
type State ¶
type State struct { *common.ModelWatcher *cloudspec.CloudSpecAPI // contains filtered or unexported fields }
State provides access to the Firewaller API facade.
func (*State) BestAPIVersion ¶
BestAPIVersion returns the API version that we were able to determine is supported by both the client and the API Server.
func (*State) WatchModelMachines ¶
func (st *State) WatchModelMachines() (watcher.StringsWatcher, error)
WatchModelMachines returns a StringsWatcher that notifies of changes to the life cycles of the top level machines in the current model.
func (*State) WatchOpenedPorts ¶
func (st *State) WatchOpenedPorts() (watcher.StringsWatcher, error)
WatchOpenedPorts returns a StringsWatcher that notifies of changes to the opened ports for the current model.
type Unit ¶
type Unit struct {
// contains filtered or unexported fields
}
Unit represents a juju unit as seen by a firewaller worker.
func (*Unit) Application ¶
func (u *Unit) Application() (*Application, error)
Application returns the application.
func (*Unit) AssignedMachine ¶
AssignedMachine returns the tag of this unit's assigned machine (if any), or a CodeNotAssigned error.