Documentation ¶ Index ¶ Variables type Chore func NewChore(log *zap.Logger, ordersDB orders.DB, config Config) *Chore func (chore *Chore) Close() error func (chore *Chore) Run(ctx context.Context) (err error) type Config Constants ¶ This section is empty. Variables ¶ View Source var ( // Error the default dbcleanup errs class. Error = errs.Class("dbcleanup error") ) Functions ¶ This section is empty. Types ¶ type Chore ¶ type Chore struct { Serials *sync2.Cycle // contains filtered or unexported fields } Chore for deleting DB entries that are no longer needed. architecture: Chore func NewChore ¶ func NewChore(log *zap.Logger, ordersDB orders.DB, config Config) *Chore NewChore creates new chore for deleting DB entries. func (*Chore) Close ¶ func (chore *Chore) Close() error Close stops the dbcleanup chore. func (*Chore) Run ¶ func (chore *Chore) Run(ctx context.Context) (err error) Run starts the db cleanup chore. type Config ¶ type Config struct { SerialsInterval time.Duration `help:"how often to delete expired serial numbers" default:"4h"` BatchSize int `` /* 126-byte string literal not displayed */ } Config defines configuration struct for dbcleanup chore. Source Files ¶ View all Source files chore.go Click to show internal directories. Click to hide internal directories.