statushistorypruner

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 7 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 jworker.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 jworker.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