logs

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackgroundRunsView

func NewBackgroundRunsView(
	container *tuikit.Container,
	runs []store.BackgroundRun,
	ds store.DataStore,
) tuikit.View

NewBackgroundRunsView creates a TUI view for active background runs.

func NewUnifiedLogView

func NewUnifiedLogView(
	container *tuikit.Container,
	records []UnifiedRecord,
	lastEntry bool,
	ds store.DataStore,
) tuikit.View

NewUnifiedLogView creates a TUI view for unified execution records. If lastEntry is true, it shows the detail view for the most recent record.

func PrintBackgroundRuns

func PrintBackgroundRuns(format string, runs []store.BackgroundRun)

PrintBackgroundRuns outputs background runs in the specified format (json, yaml, or plain text).

func PrintLastRecord

func PrintLastRecord(format string, record UnifiedRecord, stdout io.Writer)

PrintLastRecord outputs metadata and log content for a single record.

func PrintRecords

func PrintRecords(format string, records []UnifiedRecord)

PrintRecords outputs unified records in the specified format (json, yaml, or plain text).

Types

type RecordFilter

type RecordFilter struct {
	Workspace string
	Status    string // "success" or "failure"
	Since     time.Time
	Limit     int
}

RecordFilter holds optional criteria for filtering unified records.

type UnifiedRecord

type UnifiedRecord struct {
	store.ExecutionRecord
	LogEntry *tuikitIO.ArchiveEntry
}

UnifiedRecord joins an execution history record with its corresponding log archive entry (if available).

func FilterRecords

func FilterRecords(records []UnifiedRecord, f RecordFilter) []UnifiedRecord

FilterRecords applies the filter criteria to a slice of unified records.

func LoadRecords

func LoadRecords(ds store.DataStore, logsDir string) ([]UnifiedRecord, error)

LoadRecords retrieves all execution history from the data store, joined with any matching log archive entries. If ds is nil, returns empty (log-only fallback is not supported without metadata).

func LoadRecordsForRef

func LoadRecordsForRef(ds store.DataStore, logsDir string, ref string, limit int) ([]UnifiedRecord, error)

LoadRecordsForRef retrieves execution history for a specific ref, joined with matching log archive entries.

Jump to

Keyboard shortcuts

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