cleaner

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: 10 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 cleanup worker.

func NewCleaner

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

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

Types

type Cleaner

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

Cleaner is responsible for cleaning up the state.

func (*Cleaner) Kill

func (c *Cleaner) Kill()

Kill is part of the worker.Worker interface.

func (*Cleaner) Wait

func (c *Cleaner) Wait() error

Wait is part of the worker.Worker interface.

type ManifoldConfig

type ManifoldConfig struct {
	APICallerName string
	ClockName     string
}

ManifoldConfig describes the resources used by the cleanup worker.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

Validate is called by start to check for bad configuration.

type StateCleaner

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

Jump to

Keyboard shortcuts

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