dblogpruner

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxCollectionMB = 4 * 1024 // 4 GB
View Source
const DefaultMaxLogAge = 3 * 24 * time.Hour // 3 days
View Source
const DefaultPruneInterval = 5 * time.Minute

Variables

This section is empty.

Functions

func New

func New(st *state.State, params *LogPruneParams) worker.Worker

New returns a worker which periodically wakes up to remove old log entries stored in MongoDB. This worker is intended to run just once, on the MongoDB master.

Types

type LogPruneParams

type LogPruneParams struct {
	MaxLogAge       time.Duration
	MaxCollectionMB int
	PruneInterval   time.Duration
}

LogPruneParams specifies how logs should be pruned.

func NewLogPruneParams

func NewLogPruneParams() *LogPruneParams

NewLogPruneParams returns a LogPruneParams initialised with default values.

Jump to

Keyboard shortcuts

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