Documentation
¶
Index ¶
- func IsTTY() bool
- type OutputMode
- type PlainWriter
- func (w *PlainWriter) Summary(succeeded, failed int, elapsed time.Duration)
- func (w *PlainWriter) TaskDone(prefix, name string)
- func (w *PlainWriter) TaskFailed(prefix, name string, attempt, maxAttempts int, retryIn string)
- func (w *PlainWriter) TaskLine(prefix, name, line string)
- func (w *PlainWriter) TaskStarted(prefix, name string)
- type TUIMsg
- type TaskState
- type TaskStateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OutputMode ¶
type OutputMode int
OutputMode controls how output is rendered
const ( ModeTTY OutputMode = iota // BubbleTea TUI ModePlain // Plain structured text )
func DetectMode ¶
func DetectMode(noTTY bool) OutputMode
DetectMode returns the appropriate output mode
type PlainWriter ¶
type PlainWriter struct {
// contains filtered or unexported fields
}
PlainWriter writes structured plain-text output for non-TTY environments
func NewPlainWriter ¶
func NewPlainWriter() *PlainWriter
NewPlainWriter creates a PlainWriter that writes to stdout
func (*PlainWriter) Summary ¶
func (w *PlainWriter) Summary(succeeded, failed int, elapsed time.Duration)
Summary prints the final run summary
func (*PlainWriter) TaskDone ¶
func (w *PlainWriter) TaskDone(prefix, name string)
TaskDone prints a SUCCESS line with elapsed time
func (*PlainWriter) TaskFailed ¶
func (w *PlainWriter) TaskFailed(prefix, name string, attempt, maxAttempts int, retryIn string)
TaskFailed prints a FAILED line with optional retry info
func (*PlainWriter) TaskLine ¶
func (w *PlainWriter) TaskLine(prefix, name, line string)
TaskLine prints a log line for the given task
func (*PlainWriter) TaskStarted ¶
func (w *PlainWriter) TaskStarted(prefix, name string)
TaskStarted prints a RUNNING line for the given task
type TUIMsg ¶
type TUIMsg struct {
TaskName string
Status TaskStateStatus
Line string // if non-empty, a log line to append
}
TUIMsg is sent to the BubbleTea program to update task state
type TaskState ¶
type TaskState struct {
Name string
Status TaskStateStatus
StartTime time.Time
EndTime time.Time
Lines []string // accumulated log lines
}
TaskState holds the display state of a single task
type TaskStateStatus ¶
type TaskStateStatus int
TaskStateStatus represents the current state of a task in the TUI
const ( TaskPending TaskStateStatus = iota TaskRunning TaskSuccess TaskFailed )
func (TaskStateStatus) Icon ¶
func (s TaskStateStatus) Icon() string
Click to show internal directories.
Click to hide internal directories.