firewaller

package
v0.0.0-...-732aecd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2014 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 firewaller worker.

func (*Machine) InstanceId

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

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

Life returns the machine's life cycle value.

func (*Machine) WatchUnits

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

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

type Service

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

Service represents the state of a service.

func (*Service) IsExposed

func (s *Service) 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 (*Service) Life

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

Life returns the service's current life state.

func (*Service) Name

func (s *Service) Name() string

Name returns the service name.

func (*Service) Refresh

func (s *Service) Refresh() error

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

func (*Service) Watch

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

Watch returns a watcher for observing changes to a service.

type State

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

State provides access to the Firewaller API facade.

func NewState

func NewState(caller base.Caller) *State

NewState creates a new client-side Firewaller facade.

func (*State) Machine

func (st *State) Machine(tag string) (*Machine, error)

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

func (*State) Unit

func (st *State) Unit(tag string) (*Unit, error)

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

func (*State) WatchEnvironMachines

func (st *State) WatchEnvironMachines() (watcher.StringsWatcher, error)

WatchEnvironMachines returns a StringsWatcher that notifies of changes to the life cycles of the top level machines in the current environment.

type Unit

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

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

func (*Unit) AssignedMachine

func (u *Unit) AssignedMachine() (string, error)

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

func (*Unit) Life

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

Life returns the unit's life cycle value.

func (*Unit) Name

func (u *Unit) Name() string

Name returns the name of the unit.

func (*Unit) OpenedPorts

func (u *Unit) OpenedPorts() ([]instance.Port, error)

OpenedPorts returns the list of opened ports for this unit.

NOTE: This differs from state.Unit.OpenedPorts() by returning an error as well, because it needs to make an API call.

func (*Unit) Refresh

func (u *Unit) Refresh() error

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

func (*Unit) Service

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

Service returns the service.

func (*Unit) Watch

func (u *Unit) Watch() (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to the unit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL