Documentation
¶
Overview ¶
Package session provides session directory and symlink management.
Package session provides session directory and symlink management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanSessions ¶ added in v0.1.2
CleanSessions removes old session directories from outputDir, keeping the newest retain count. Returns the list of deleted directory names. Only directories matching the timestamp pattern are considered sessions. The "latest" symlink is updated if it pointed to a deleted session.
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
LogWriter writes logs to per-container files and a combined log file.
func NewLogWriter ¶
NewLogWriter creates a new log writer for a session. maxNameLen is the longest container name for fixed-width formatting.
type Metadata ¶
type Metadata struct {
StartTime time.Time `json:"start_time"`
Command string `json:"command"`
Containers []string `json:"containers"`
}
Metadata is written to metadata.json in the session directory.
type Session ¶
type Session struct {
Dir string // Full path to session directory (e.g., logs/2026-03-04-103001/)
StartTime time.Time // Session start time
Command string // Original command line
Containers []string // Container names being logged
}
Session represents a logging session with metadata and output directory.