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

package auditconfigupdater

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


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). Updated 2020-08-11. Refresh now. Tools for package owners.