firewaller

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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
}

Application represents the state of an application.

func (*Application) ExposeInfo

func (s *Application) ExposeInfo() (bool, map[string]params.ExposedEndpoint, error)

ExposeInfo returns a flag to indicate whether an application is exposed as well as any endpoint-specific expose settings (if present).

func (*Application) Name

func (s *Application) Name() string

Name returns the application name.

func (*Application) Tag

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

Tag returns the application tag.

func (*Application) Watch

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

Watch returns a watcher for observing changes to an application.

type Client

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

Client provides access to the Firewaller API facade.

func NewClient

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

NewClient creates a new client-side Firewaller API facade.

func (*Client) AllSpaceInfos

func (c *Client) AllSpaceInfos() (network.SpaceInfos, error)

AllSpaceInfos returns the details about the known spaces and their associated subnets.

func (*Client) ControllerAPIInfoForModel

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

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

func (*Client) MacaroonForRelation

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

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

func (*Client) Machine

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

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

func (*Client) ModelFirewallRules

func (c *Client) ModelFirewallRules() (firewall.IngressRules, error)

ModelFirewallRules returns the firewall rules that this model is configured to open

func (*Client) ModelTag

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

ModelTag returns the current model's tag.

func (*Client) Relation

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

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

func (*Client) SetRelationStatus

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

SetRelationStatus sets the status for a given relation.

func (*Client) Unit

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

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

func (*Client) WatchEgressAddressesForRelation

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

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) WatchModelFirewallRules

func (c *Client) WatchModelFirewallRules() (watcher.NotifyWatcher, error)

WatchModelFirewallRules returns a NotifyWatcher that notifies of potential changes to a model's configured firewall rules

func (*Client) WatchModelMachines

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

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

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

func (*Client) WatchSubnets

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

WatchSubnets returns a StringsWatcher that notifies of changes to the model subnets.

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

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

IsManual returns true if the machine was manually provisioned.

func (*Machine) Life

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

Life returns the machine's life cycle value.

func (*Machine) OpenedMachinePortRanges

func (m *Machine) OpenedMachinePortRanges() (byUnitAndCIDR map[names.UnitTag]network.GroupedPortRanges, byUnitAndEndpoint map[names.UnitTag]network.GroupedPortRanges, err error)

OpenedMachinePortRanges queries the open port ranges for all units on this machine and returns back two maps where keys are unit names and values are open port range groupings by subnet CIDR and endpoint name.

func (*Machine) Tag

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

Tag returns the machine tag.

func (*Machine) WatchUnits

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

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

type Relation

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

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

func (*Relation) Life

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

Life returns the relation's life cycle value.

func (*Relation) Tag

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

Tag returns the relation tag.

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

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

func (u *Unit) Life() life.Value

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) Refresh

func (u *Unit) Refresh() error

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

func (*Unit) Tag

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

Tag returns the unit tag.

Jump to

Keyboard shortcuts

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