Documentation
¶
Overview ¶
Package cleanup provides background goroutines that:
- Stop containers for sessions idle beyond the configured timeout.
- 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.
Click to show internal directories.
Click to hide internal directories.