cleanup

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cleanup provides background goroutines that:

  1. Stop containers for sessions idle beyond the configured timeout.
  2. Purge audit log entries older than the configured retention window.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, db *sqlx.DB, docker *dockerpkg.Client, al *audit.Logger, interval, idleFor time.Duration, retentionDays int)

Start launches the idle-session cleanup loop. It runs until ctx is cancelled. interval controls how frequently the sweep runs; idleFor is how long a session must have been quiet before its container is stopped (workspace is preserved).

When retentionDays > 0, audit logs older than that many days are also pruned on every sweep. Set to 0 to retain audit logs indefinitely.

Types

This section is empty.

Jump to

Keyboard shortcuts

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