Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Interval time.Duration IncrementInterval time.Duration Errors chan error Affected chan int64 DeleteFunc func() (string, []interface{}) }
Config contains the configuration properties that will be used by the sweeper during calls to Sweep.
type Sweeper ¶
type Sweeper struct { Errs chan error Affected chan int64 Done chan struct{} // contains filtered or unexported fields }
func (*Sweeper) Sweep ¶
func (s *Sweeper) Sweep()
Sweep is a blocking function that clears down a database table using Config provided at initialisation. It will wait for a given Interval before starting a sweep process, clearing down Limit items at a time every IncrementInterval until the table is empty.
Click to show internal directories.
Click to hide internal directories.