maintenance

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 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

Overview

Package maintenance runs housekeeping jobs: expired sessions and sign-in challenges, audit-log retention, and lists deleted longer ago than they can be restored.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *jobs.Registry, pool *pgxpool.Pool, log *slog.Logger)

Register adds the maintenance workers and schedules.

Types

type CleanupArgs

type CleanupArgs struct{}

CleanupArgs is the periodic housekeeping job.

func (CleanupArgs) InsertOpts

func (CleanupArgs) InsertOpts() river.InsertOpts

InsertOpts keeps one cleanup job at a time on the maintenance queue.

func (CleanupArgs) Kind

func (CleanupArgs) Kind() string

Kind implements river.JobArgs.

type CleanupWorker

type CleanupWorker struct {
	river.WorkerDefaults[CleanupArgs]
	Pool *pgxpool.Pool
	Log  *slog.Logger
}

CleanupWorker deletes expired auth state, audit entries past retention and lists past their restore window.

func (*CleanupWorker) Work

Work implements river.Worker.

Jump to

Keyboard shortcuts

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