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

package cleaner

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

Index

Package Files

cleaner.go manifold.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a Manifold that encapsulates the cleanup worker.

func NewCleaner Uses

func NewCleaner(st StateCleaner, clock clock.Clock, logger Logger) (worker.Worker, error)

NewCleaner returns a worker.Worker that runs state.Cleanup() periodically, and whenever the CleanupWatcher signals documents marked for deletion.

type Cleaner Uses

type Cleaner struct {
    // contains filtered or unexported fields
}

Cleaner is responsible for cleaning up the state.

func (*Cleaner) Kill Uses

func (c *Cleaner) Kill()

Kill is part of the worker.Worker interface.

func (*Cleaner) Wait Uses

func (c *Cleaner) Wait() error

Wait is part of the worker.Worker interface.

type Logger Uses

type Logger interface {
    Errorf(string, ...interface{})
}

Logger represents the methods used by the worker to log information.

type ManifoldConfig Uses

type ManifoldConfig struct {
    APICallerName string
    Clock         clock.Clock
    Logger        Logger
}

ManifoldConfig describes the resources used by the cleanup worker.

func (ManifoldConfig) Validate Uses

func (config ManifoldConfig) Validate() error

Validate is called by start to check for bad configuration.

type StateCleaner Uses

type StateCleaner interface {
    Cleanup() error
    WatchCleanups() (watcher.NotifyWatcher, error)
}

Package cleaner imports 9 packages (graph) and is imported by 43 packages. Updated 2019-10-11. Refresh now. Tools for package owners.