juju: github.com/juju/juju/apiserver/common/firewall Index | Files

package firewall

import "github.com/juju/juju/apiserver/common/firewall"

Index

Package Files

egressaddresswatcher.go firewall.go state.go

func StateShim Uses

func StateShim(st *state.State, m *state.Model) stateShim

TODO(wallyworld) - for tests, remove when remaining firewaller tests become unit tests.

func WatchEgressAddressesForRelations Uses

func WatchEgressAddressesForRelations(resources facade.Resources, st State, relations params.Entities) (params.StringsWatchResults, error)

WatchEgressAddressesForRelations creates 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 for the relation.

type Application Uses

type Application interface {
    Name() string
}

type EgressAddressWatcher Uses

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

EgressAddressWatcher reports changes to addresses for local units in a given relation. Each event contains the entire set of addresses which are required for ingress on the remote side of the relation.

func NewEgressAddressWatcher Uses

func NewEgressAddressWatcher(backend State, rel Relation, appName string) (*EgressAddressWatcher, error)

NewEgressAddressWatcher creates an EgressAddressWatcher.

func (*EgressAddressWatcher) Changes Uses

func (w *EgressAddressWatcher) Changes() <-chan []string

Changes returns the event channel for this watcher.

func (*EgressAddressWatcher) Err Uses

func (w *EgressAddressWatcher) Err() error

Err returns any error encountered while the watcher has been running.

func (*EgressAddressWatcher) Kill Uses

func (w *EgressAddressWatcher) Kill()

Kill asks the watcher to stop without waiting for it do so.

func (*EgressAddressWatcher) Stop Uses

func (w *EgressAddressWatcher) Stop() error

Stop kills the watcher, then waits for it to die.

func (*EgressAddressWatcher) Wait Uses

func (w *EgressAddressWatcher) Wait() error

Wait waits for the watcher to die and returns any error encountered when it was running.

type Machine Uses

type Machine interface {
    Id() string
    WatchAddresses() state.NotifyWatcher
}

type Relation Uses

type Relation interface {
    status.StatusSetter
    Endpoints() []state.Endpoint
    WatchUnits(applicationName string) (state.RelationUnitsWatcher, error)
    WatchRelationIngressNetworks() state.StringsWatcher
    WatchRelationEgressNetworks() state.StringsWatcher
}

type State Uses

type State interface {
    state.ModelMachinesWatcher
    state.ModelAccessor

    WatchSubnets(func(id interface{}) bool) state.StringsWatcher

    KeyRelation(string) (Relation, error)

    Unit(string) (Unit, error)

    Machine(string) (Machine, error)

    Application(string) (Application, error)
}

State provides the subset of global state required by the remote firewaller facade.

type Unit Uses

type Unit interface {
    Name() string
    PublicAddress() (network.SpaceAddress, error)
    AssignedMachineId() (string, error)
}

Package firewall imports 16 packages (graph) and is imported by 2 packages. Updated 2019-09-24. Refresh now. Tools for package owners.