auditconfigupdater

package
v0.0.0-...-756137a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold to run an auditconfigupdater.

func NewWorker

func NewWorker(controllerConfigService ControllerConfigService, initial auditlog.Config, logFactory AuditLogFactory) (worker.Worker, error)

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

Types

type AuditLogFactory

type AuditLogFactory func(auditlog.Config) auditlog.AuditLog

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

type ControllerConfigService

type ControllerConfigService interface {
	// ControllerConfig returns the config values for the controller.
	ControllerConfig(ctx context.Context) (controller.Config, error)

	// WatchControllerConfig returns a watcher that returns keys for any changes
	// to controller config.
	WatchControllerConfig() (watcher.StringsWatcher, error)
}

ControllerConfigService is an interface for getting the controller config.

func GetControllerConfigService

func GetControllerConfigService(getter dependency.Getter, name string) (ControllerConfigService, error)

GetControllerConfigService is a helper function that gets a service from the manifold.

type GetControllerConfigServiceFunc

type GetControllerConfigServiceFunc func(getter dependency.Getter, name string) (ControllerConfigService, error)

GetControllerConfigServiceFunc is a helper function that gets a service from the manifold.

type ManifoldConfig

type ManifoldConfig struct {
	AgentName                  string
	DomainServicesName         string
	NewWorker                  func(ControllerConfigService, auditlog.Config, AuditLogFactory) (worker.Worker, error)
	GetControllerConfigService GetControllerConfigServiceFunc
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL