juju: github.com/juju/juju/worker/caasfirewaller Index | Files

package caasfirewaller

import "github.com/juju/juju/worker/caasfirewaller"


Package Files

application_worker.go broker.go client.go manifold.go worker.go

func Manifold Uses

func Manifold(cfg ManifoldConfig) dependency.Manifold

Manifold returns a Manifold that encapsulates the firewaller worker.

func NewWorker Uses

func NewWorker(config Config) (worker.Worker, error)

NewWorker starts and returns a new CAAS unit firewaller worker.

type ApplicationGetter Uses

type ApplicationGetter interface {
    WatchApplications() (watcher.StringsWatcher, error)
    WatchApplication(string) (watcher.NotifyWatcher, error)
    IsExposed(string) (bool, error)
    ApplicationConfig(string) (application.ConfigAttributes, error)

ApplicationGetter provides an interface for watching for the lifecycle state changes (including addition) of applications in the model, and fetching their details.

type Client Uses

type Client interface {

Client provides an interface for interacting with the CAASFirewaller API. Subsets of this should be passed to the CAASFirewaller worker.

type Config Uses

type Config struct {
    ControllerUUID    string
    ModelUUID         string
    ApplicationGetter ApplicationGetter
    LifeGetter        LifeGetter
    ServiceExposer    ServiceExposer

Config holds configuration for the CAAS unit firewaller worker.

func (Config) Validate Uses

func (config Config) Validate() error

Validate validates the worker configuration.

type LifeGetter Uses

type LifeGetter interface {
    Life(string) (life.Value, error)

LifeGetter provides an interface for getting the lifecycle state value for an application.

type ManifoldConfig Uses

type ManifoldConfig struct {
    APICallerName string
    BrokerName    string

    ControllerUUID string
    ModelUUID      string

    NewClient func(base.APICaller) Client
    NewWorker func(Config) (worker.Worker, error)

ManifoldConfig describes the resources used by the firewaller worker.

func (ManifoldConfig) Validate Uses

func (config ManifoldConfig) Validate() error

Validate is called by start to check for bad configuration.

type ServiceExposer Uses

type ServiceExposer interface {
    ExposeService(appName string, resourceTags map[string]string, config application.ConfigAttributes) error
    UnexposeService(appName string) error

Package caasfirewaller imports 13 packages (graph) and is imported by 3 packages. Updated 2019-10-05. Refresh now. Tools for package owners.