Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(cfg ManifoldConfig) dependency.Manifold
Manifold returns a Manifold that encapsulates the firewaller worker.
Types ¶
type CAASBroker ¶
type CAASBroker interface {
Application(string, caas.DeploymentType) caas.Application
}
CAASBroker exposes CAAS broker functionality to a worker.
type CAASFirewallerAPI ¶
type CAASFirewallerAPI interface { WatchApplications() (watcher.StringsWatcher, error) WatchApplication(string) (watcher.NotifyWatcher, error) WatchOpenedPorts() (watcher.StringsWatcher, error) GetOpenedPorts(appName string) (network.GroupedPortRanges, error) IsExposed(string) (bool, error) ApplicationConfig(string) (config.ConfigAttributes, error) ApplicationCharmInfo(appName string) (*charmscommon.CharmInfo, error) }
CAASFirewallerAPI provides an interface for watching for the lifecycle state changes (including addition) of applications in the model, and fetching their details.
type Client ¶
type Client interface { CAASFirewallerAPI LifeGetter }
Client provides an interface for interacting with the CAASFirewallerAPI. Subsets of this should be passed to the CAASFirewaller worker.
type Config ¶
type Config struct { ControllerUUID string ModelUUID string FirewallerAPI CAASFirewallerAPI LifeGetter LifeGetter Broker CAASBroker Logger Logger }
Config holds configuration for the CAAS unit firewaller worker.
type LifeGetter ¶
LifeGetter provides an interface for getting the lifecycle state value for an application.
type Logger ¶
type Logger interface { Debugf(string, ...interface{}) Warningf(string, ...interface{}) Errorf(string, ...interface{}) Tracef(string, ...interface{}) }
Logger represents the methods used by the worker to log details.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string BrokerName string ControllerUUID string ModelUUID string NewClient func(base.APICaller) Client NewWorker func(Config) (worker.Worker, error) Logger Logger }
ManifoldConfig describes the resources used by the firewaller worker.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate is called by start to check for bad configuration.
type PortMutator ¶
type PortMutator interface {
UpdatePorts(ports []caas.ServicePort, updateContainerPorts bool) error
}
PortMutator exposes CAAS application functionality to a worker.
type ServiceUpdater ¶
type ServiceUpdater interface {
UpdateService(caas.ServiceParam) error
}
ServiceUpdater exposes CAAS application functionality to a worker.