juju: github.com/juju/juju/worker/txnpruner Index | Files

package txnpruner

import "github.com/juju/juju/worker/txnpruner"


Package Files

manifold.go txnpruner.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold that will run a txn pruner worker.

func New Uses

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

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

type ManifoldConfig Uses

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 Uses

func (config ManifoldConfig) Validate() error

type TransactionPruner Uses

type TransactionPruner interface {
    MaybePruneTransactions() error

TransactionPruner defines the interface for types capable of pruning transactions.

Package txnpruner imports 7 packages (graph) and is imported by 34 packages. Updated 2020-05-01. Refresh now. Tools for package owners.