cleaner

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

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

Cleaner is a periodic.Task implementation that deletes expired data.

func New

func New(deleter ExpiredDeleter, subsystem string) *Cleaner

New returns a new cleaner task that deletes expired data using deleter.

func (*Cleaner) Name

func (c *Cleaner) Name() string

Name returns the tasks name.

func (*Cleaner) Run

func (c *Cleaner) Run(ctx context.Context)

Run deletes expired entries using the deleter func.

type ExpiredDeleter

type ExpiredDeleter func(ctx context.Context) (int, error)

ExpiredDeleter is used to delete expired data.

Jump to

Keyboard shortcuts

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