dbpurge

package
v2.34.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new periodically purging database instance. Callers must Close the returned instance.

The auditor pointer is loaded on each dispatch tick so runtime entitlement changes (e.g. toggling the audit-log feature) take effect without restarting the process. Notifications enqueuer defaults to no-op. Use WithNotificationsEnqueuer to pass a real one.

Types

type Option added in v2.33.0

type Option func(*instance)

func WithChatAutoArchiveBatchSize added in v2.33.0

func WithChatAutoArchiveBatchSize(n int32) Option

WithChatAutoArchiveBatchSize overrides how many root chats a single tick will auto-archive. Defaults to defaultChatAutoArchiveBatchSize (1000).

func WithClock added in v2.33.0

func WithClock(clk quartz.Clock) Option

WithClock overrides the clock used by the purger. Defaults to quartz.NewReal().

func WithNotificationsEnqueuer added in v2.33.0

func WithNotificationsEnqueuer(e notifications.Enqueuer) Option

WithNotificationsEnqueuer sets the enqueuer used for digest notifications. Defaults to notifications.NewNoopEnqueuer(). Panics if e is nil: a nil enqueuer would NPE on the first dispatch tick, and failing fast at option-apply time surfaces the misuse at startup rather than minutes later.

Jump to

Keyboard shortcuts

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