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 ¶
Chore archives bucket and storagenode rollups at a given interval.
architecture: Chore
func New ¶
func New(log *zap.Logger, sdb accounting.StoragenodeAccounting, pdb accounting.ProjectAccounting, config Config) *Chore
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.
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.
Click to show internal directories.
Click to hide internal directories.