Back to godoc.org
github.com/juju/juju/worker/auditconfigupdater

package auditconfigupdater

v0.0.0 (4dcf1d7)
Latest Go to latest
Published: 1 day ago | License: AGPL-3.0 | Module: github.com/juju/juju

Index

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold to run an auditconfigupdater.

func New

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

type AuditLogFactory func(auditlog.Config) auditlog.AuditLog

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

type ConfigSource

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

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

func (config ManifoldConfig) Validate() error

Validate validates the manifold configuration.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier