rolluparchive

package
v1.88.1-rc Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 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 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" testDefault:"$TESTINTERVAL"`
	ArchiveAge time.Duration `help:"age at which a rollup is archived" default:"2160h" testDefault:"24h"`
	BatchSize  int           `` /* 137-byte string literal not displayed */
	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