txnpruner

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: 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 dependency.Manifold that will run a txn pruner worker.

func New

func New(tp TransactionPruner, interval time.Duration, clock clock.Clock) worker.Worker

New returns a worker which periodically prunes the data for completed transactions.

Types

type ManifoldConfig

type ManifoldConfig struct {
	ClockName string
	StateName string

	PruneInterval time.Duration
	NewWorker     func(TransactionPruner, time.Duration, clock.Clock) worker.Worker
}

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

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

type TransactionPruner

type TransactionPruner interface {
	MaybePruneTransactions() error
}

TransactionPruner defines the interface for types capable of pruning transactions.

Jump to

Keyboard shortcuts

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