Thanks to visit codestin.com
Credit goes to pkg.go.dev

dbpurge

package
v2.33.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

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