rolluparchive

package
v1.28.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error = errs.Class("rolluparchive error")
)

Error is a standard error class for this package.

Functions

This section is empty.

Types

type Chore

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

Chore archives bucket and storagenode rollups at a given interval.

architecture: Chore

func New

New creates a new rollup archiver chore.

func (*Chore) ArchiveRollups

func (chore *Chore) ArchiveRollups(ctx context.Context, cutoff time.Time, batchSize int) (err error)

ArchiveRollups will remove old rollups from active rollup tables.

func (*Chore) Close

func (chore *Chore) Close() error

Close stops the service and releases any resources.

func (*Chore) Run

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

Run starts the archiver chore.

type Config

type Config struct {
	Interval   time.Duration `help:"how frequently rollup archiver should run" releaseDefault:"24h" devDefault:"120s"`
	ArchiveAge time.Duration `help:"age at which a rollup is archived" releaseDefault:"2160h" devDefault:"24h"`
	BatchSize  int           `help:"number of records to delete per delete execution. Used only for crdb which is slow without limit." default:"500"`
	Enabled    bool          `help:"whether or not the rollup archive is enabled." default:"true"`
}

Config contains configurable values for rollup archiver.

Jump to

Keyboard shortcuts

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