statushistorypruner

package
v0.0.0-...-6cf1bc9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: AGPL-3.0 Imports: 6 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 Manifold that encapsulates the statushistorypruner worker.

func New

func New(conf Config) (worker.Worker, error)

New returns a worker.Worker for history Pruner.

Types

type Config

type Config struct {
	Facade         Facade
	MaxHistoryTime time.Duration
	MaxHistoryMB   uint
	PruneInterval  time.Duration
	// TODO(fwereade): 2016-03-17 lp:1558657
	NewTimer worker.NewTimerFunc
}

Config holds all necessary attributes to start a pruner worker.

func (*Config) Validate

func (c *Config) Validate() error

Validate will err unless basic requirements for a valid config are met.

type Facade

type Facade interface {
	Prune(time.Duration, int) error
}

Facade represents an API that implements status history pruning.

type ManifoldConfig

type ManifoldConfig struct {
	APICallerName  string
	MaxHistoryTime time.Duration
	MaxHistoryMB   uint
	PruneInterval  time.Duration
	// TODO(fwereade): 2016-03-17 lp:1558657
	NewTimer worker.NewTimerFunc
}

ManifoldConfig describes the resources and configuration on which the statushistorypruner worker depends.

Jump to

Keyboard shortcuts

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