dblogpruner

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 10 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 that will run a log pruner worker.

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

NewWorker returns a worker which periodically wakes up to remove old log entries stored in MongoDB. This worker must not be run in more than one agent concurrently.

Types

type Config

type Config struct {
	State         *state.State
	Clock         clock.Clock
	PruneInterval time.Duration
}

func (Config) Validate

func (config Config) Validate() error

type ManifoldConfig

type ManifoldConfig struct {
	ClockName string
	StateName string

	PruneInterval time.Duration
	NewWorker     func(Config) (worker.Worker, error)
}

ManifoldConfig holds the information necessary to run a log pruner worker in a dependency.Engine.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

Jump to

Keyboard shortcuts

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