cleanup

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(retention time.Duration)

Run deletes expired records older than the retention threshold from all transient tables. It is safe to call concurrently and is idempotent.

func Start

func Start(ctx context.Context, interval, retention time.Duration, hooks ...func())

Start launches a background goroutine that calls Run every interval. Optional hooks are called on every tick alongside the DB cleanup. It stops when ctx is cancelled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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