juju: github.com/juju/juju/api/firewaller Index | Files

package firewaller

import "github.com/juju/juju/api/firewaller"

Index

Package Files

application.go firewaller.go machine.go relation.go unit.go

type Application Uses

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

Application represents the state of an application.

func (*Application) IsExposed Uses

func (s *Application) IsExposed() (bool, error)

IsExposed returns whether this application is exposed. The explicitly open ports (with open-port) for exposed application may be accessed from machines outside of the local deployment network.

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

func (*Application) Name Uses

func (s *Application) Name() string

Name returns the application name.

func (*Application) Tag Uses

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

Tag returns the application tag.

func (*Application) Watch Uses

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

Watch returns a watcher for observing changes to an application.

type Client Uses

type Client struct {
    *common.ModelWatcher
    *cloudspec.CloudSpecAPI
    // contains filtered or unexported fields
}

Client provides access to the Firewaller API facade.

func NewClient Uses

func NewClient(caller base.APICaller) (*Client, error)

NewClient creates a new client-side Firewaller API facade.

func (*Client) BestAPIVersion Uses

func (c *Client) BestAPIVersion() int

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

func (*Client) ControllerAPIInfoForModel Uses

func (c *Client) ControllerAPIInfoForModel(modelUUID string) (*api.Info, error)

ControllerAPIInfoForModels returns the controller api connection details for the specified model.

func (*Client) FirewallRules Uses

func (c *Client) FirewallRules(knownServices ...string) ([]params.FirewallRule, error)

FirewallRules returns the firewall rules for the specified known service names.

func (*Client) MacaroonForRelation Uses

func (c *Client) MacaroonForRelation(relationKey string) (*macaroon.Macaroon, error)

MacaroonForRelation returns the macaroon to use when publishing changes for the relation.

func (*Client) Machine Uses

func (c *Client) Machine(tag names.MachineTag) (*Machine, error)

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

func (*Client) ModelTag Uses

func (c *Client) ModelTag() (names.ModelTag, bool)

ModelTag returns the current model's tag.

func (*Client) Relation Uses

func (c *Client) Relation(tag names.RelationTag) (*Relation, error)

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

func (*Client) SetRelationStatus Uses

func (c *Client) SetRelationStatus(relationKey string, status relation.Status, message string) error

SetRelationStatus sets the status for a given relation.

func (*Client) Unit Uses

func (c *Client) Unit(tag names.UnitTag) (*Unit, error)

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

func (*Client) WatchEgressAddressesForRelation Uses

func (c *Client) WatchEgressAddressesForRelation(relationTag names.RelationTag) (watcher.StringsWatcher, error)

WatchEgressAddressesForRelation returns a watcher that notifies when addresses, from which connections will originate to the provider side of the relation, change. Each event contains the entire set of addresses which the provider side is required to allow for access from the other side of the relation.

func (*Client) WatchIngressAddressesForRelation Uses

func (c *Client) WatchIngressAddressesForRelation(relationTag names.RelationTag) (watcher.StringsWatcher, error)

WatchIngressAddressesForRelation returns a watcher that notifies when addresses, from which connections will originate for the relation, change. Each event contains the entire set of addresses which are required for ingress into this model from the other requirer side of the relation.

func (*Client) WatchModelMachines Uses

func (c *Client) 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 (*Client) WatchOpenedPorts Uses

func (c *Client) WatchOpenedPorts() (watcher.StringsWatcher, error)

WatchOpenedPorts returns a StringsWatcher that notifies of changes to the opened ports for the current model.

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

func (m *Machine) IsManual() (bool, error)

IsManual returns true if the machine was manually provisioned.

func (*Machine) Life Uses

func (m *Machine) Life() life.Value

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 Relation Uses

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

Relation represents a juju relation as seen by the firewaller worker.

func (*Relation) Life Uses

func (r *Relation) Life() life.Value

Life returns the relation's life cycle value.

func (*Relation) Tag Uses

func (r *Relation) Tag() names.RelationTag

Tag returns the relation tag.

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() life.Value

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 15 packages (graph) and is imported by 61 packages. Updated 2019-11-28. Refresh now. Tools for package owners.