clean

package
v1.20.11 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBCleaner

type DBCleaner struct {
	// contains filtered or unexported fields
}

DBCleaner db cleaner

func NewDBCleaner

func NewDBCleaner(db drivers.DB, tableName string, checkInterval time.Duration) *DBCleaner

NewDBCleaner create db cleaner

func (*DBCleaner) Run

func (dbc *DBCleaner) Run(ctx context.Context)

Run run cleaner

func (*DBCleaner) WithMaxDuration

func (dbc *DBCleaner) WithMaxDuration(maxDuration time.Duration, timeTagName string)

WithMaxDuration set max time duration

func (*DBCleaner) WithMaxEntryNum

func (dbc *DBCleaner) WithMaxEntryNum(num int64)

WithMaxEntryNum set max entry

Jump to

Keyboard shortcuts

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