juju-snap: github.com/wallyworld/juju-snap/api/firewaller Index | Files

package firewaller

import "github.com/wallyworld/juju-snap/api/firewaller"

Index

Package Files

firewaller.go machine.go service.go unit.go

type Application Uses

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

Service represents the state of a service.

func (*Application) IsExposed Uses

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 Uses

func (s *Application) Life() params.Life

Life returns the service's current life state.

func (*Application) Name Uses

func (s *Application) Name() string

Name returns the service name.

func (*Application) Refresh Uses

func (s *Application) Refresh() error

Refresh refreshes the contents of the Service from the underlying state.

func (*Application) Tag Uses

func (s *Application) Tag() names.ApplicationTag

Tag returns the service tag.

func (*Application) Watch Uses

func (s *Application) Watch() (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to a service.

type Machine Uses

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

Machine represents a juju machine as seen by the firewaller worker.

func (*Machine) ActiveSubnets Uses

func (m *Machine) ActiveSubnets() ([]names.SubnetTag, error)

ActiveSubnets returns a list of subnet tags for which the machine has opened ports.

func (*Machine) InstanceId Uses

func (m *Machine) InstanceId() (instance.Id, error)

InstanceId returns the provider specific instance id for this machine, or a CodeNotProvisioned error, if not set.

func (*Machine) Life Uses

func (m *Machine) Life() params.Life

Life returns the machine's life cycle value.

func (*Machine) OpenedPorts Uses

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) Tag Uses

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

Tag returns the machine tag.

func (*Machine) WatchUnits Uses

func (m *Machine) WatchUnits() (watcher.StringsWatcher, error)

WatchUnits starts a StringsWatcher to watch all units assigned to the machine.

type State Uses

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

State provides access to the Firewaller API facade.

func NewState Uses

func NewState(caller base.APICaller) *State

NewState creates a new client-side Firewaller API facade.

func (*State) BestAPIVersion Uses

func (st *State) BestAPIVersion() int

BestAPIVersion returns the API version that we were able to determine is supported by both the client and the API Server.

func (*State) Machine Uses

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

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

func (*State) ModelTag Uses

func (st *State) ModelTag() (names.ModelTag, error)

ModelTag returns the current model's tag.

func (*State) Unit Uses

func (st *State) Unit(tag names.UnitTag) (*Unit, error)

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

func (*State) WatchModelMachines Uses

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 Uses

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 Uses

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

Unit represents a juju unit as seen by a firewaller worker.

func (*Unit) Application Uses

func (u *Unit) Application() (*Application, error)

Application returns the application.

func (*Unit) AssignedMachine Uses

func (u *Unit) AssignedMachine() (names.MachineTag, error)

AssignedMachine returns the tag of this unit's assigned machine (if any), or a CodeNotAssigned error.

func (*Unit) Life Uses

func (u *Unit) Life() params.Life

Life returns the unit's life cycle value.

func (*Unit) Name Uses

func (u *Unit) Name() string

Name returns the name of the unit.

func (*Unit) Refresh Uses

func (u *Unit) Refresh() error

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

func (*Unit) Tag Uses

func (u *Unit) Tag() names.UnitTag

Tag returns the unit tag.

Package firewaller imports 10 packages (graph). Updated 2017-06-11. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).