maintenance

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

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