Documentation
¶
Overview ¶
Package output provides tree-structured rendering for DAG execution status.
Index ¶
Constants ¶
const ( TreeBranch = "├─" TreeLastBranch = "└─" TreePipe = "│ " TreeSpace = " " )
Tree drawing characters using Unicode box-drawing characters.
const ( // DefaultMaxOutputLines is the default number of lines to show for stdout/stderr. DefaultMaxOutputLines = 50 // DefaultMaxWidth is the maximum line width before wrapping. DefaultMaxWidth = 80 )
Variables ¶
This section is empty.
Functions ¶
func ReadLogFileTail ¶
ReadLogFileTail reads the last N lines from a log file. It returns:
- lines: the actual log lines (tail portion if truncated)
- truncated: number of lines that were truncated from the beginning
- err: any error encountered while reading
If maxLines is 0 or negative, all lines are returned. If the file doesn't exist or is empty, returns nil, 0, nil. Binary files are detected and return ["(binary data)"], 0, nil. Files larger than 10MB are skipped to prevent memory exhaustion.
func StatusText ¶
StatusText returns human-readable status text for a DAG status.
Types ¶
type Config ¶
type Config struct {
ColorEnabled bool // Enable colored output using ANSI escape codes.
ShowStdout bool // Display stdout content in the tree.
ShowStderr bool // Display stderr content in the tree.
MaxOutputLines int // Limit stdout/stderr to last N lines (0 = unlimited).
MaxWidth int // Maximum line width before wrapping (0 = no wrapping).
}
Config holds configuration for tree rendering.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configuration with sensible defaults.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer renders DAG execution status as a tree structure.
func NewRenderer ¶
NewRenderer creates a new tree renderer with the given configuration.
func (*Renderer) RenderDAGStatus ¶
RenderDAGStatus renders the complete DAG status as a tree structure.