expireddeletion

package
v1.15.0-rc Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package expireddeletion contains the functions needed to run expired segment deletion

The expireddeletion.expiredDeleter implements the metainfo loop Observer interface allowing us to subscribe to the loop to get information for every segment in the metainfo database.

The expireddeletion chore will subscribe the deleter to the metainfo loop and delete any expired segments from metainfo.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error defines the expireddeletion chore errors class.
	Error = errs.Class("expireddeletion chore error")
)

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Loop *sync2.Cycle
	// contains filtered or unexported fields
}

Chore implements the expired segment cleanup chore

architecture: Chore

func NewChore

func NewChore(log *zap.Logger, config Config, meta *metainfo.Service, loop *metainfo.Loop) *Chore

NewChore creates a new instance of the expireddeletion chore.

func (*Chore) Run

func (chore *Chore) Run(ctx context.Context) (err error)

Run starts the expireddeletion loop service.

type Config

type Config struct {
	Interval time.Duration `` /* 126-byte string literal not displayed */
	Enabled  bool          `help:"set if expired segment cleanup is enabled or not" releaseDefault:"true" devDefault:"true"`
}

Config contains configurable values for expired segment cleanup.

Jump to

Keyboard shortcuts

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