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

package auditconfigupdater

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

Index

Package Files

manifold.go worker.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold to run an auditconfigupdater.

func New Uses

func New(source ConfigSource, initial auditlog.Config, logFactory AuditLogFactory) (worker.Worker, error)

New returns a worker that will keep an up-to-date audit log config.

type AuditLogFactory Uses

type AuditLogFactory func(auditlog.Config) auditlog.AuditLog

AuditLogFactory is a function that will return an audit log given config.

type ConfigSource Uses

type ConfigSource interface {
    WatchControllerConfig() state.NotifyWatcher
    ControllerConfig() (controller.Config, error)
}

ConfigSource lets us get notifications of changes to controller configuration, and then get the changed config. (Primary implementation is State.)

type ManifoldConfig Uses

type ManifoldConfig struct {
    AgentName string
    StateName string
    NewWorker func(ConfigSource, auditlog.Config, AuditLogFactory) (worker.Worker, error)
}

ManifoldConfig holds the information needed to run an auditconfigupdater in a dependency.Engine.

func (ManifoldConfig) Validate Uses

func (config ManifoldConfig) Validate() error

Validate validates the manifold configuration.

Package auditconfigupdater imports 11 packages (graph) and is imported by 4 packages. Updated 2018-11-21. Refresh now. Tools for package owners.