Documentation
¶
Index ¶
- type Display
- type DisplayMode
- type ExecutionProgress
- type FileProgress
- type ProgressTracker
- func (pt *ProgressTracker) Finish(success bool) error
- func (pt *ProgressTracker) Output(stepID string, output string) error
- func (pt *ProgressTracker) SetState(state *core.ExecutionState)
- func (pt *ProgressTracker) Start() error
- func (pt *ProgressTracker) StepCompleted(stepID string, duration time.Duration) error
- func (pt *ProgressTracker) StepFailed(stepID string, err error) error
- func (pt *ProgressTracker) StepSkipped(stepID string, reason string) error
- func (pt *ProgressTracker) StepStarted(stepID string) error
- func (pt *ProgressTracker) Update() error
- type StepProgress
- type StepStatus
- type TerminalDisplay
- func (td *TerminalDisplay) Close() error
- func (td *TerminalDisplay) Finish(success bool, summary string) error
- func (td *TerminalDisplay) Init(ctx context.Context) error
- func (td *TerminalDisplay) ShowError(stepID string, err error) error
- func (td *TerminalDisplay) ShowOutput(stepID string, output string) error
- func (td *TerminalDisplay) Start(plan *config.ExecutionPlan) error
- func (td *TerminalDisplay) UpdateProgress(progress *ExecutionProgress) error
- func (td *TerminalDisplay) UpdateStep(stepID string, status StepStatus, message string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Display ¶
type Display interface {
// Initialize the display
Init(ctx context.Context) error
// Start displaying execution
Start(plan *config.ExecutionPlan) error
// Update progress
UpdateProgress(progress *ExecutionProgress) error
// Update step status
UpdateStep(stepID string, status StepStatus, message string) error
// Show error
ShowError(stepID string, err error) error
// Show output from executors
ShowOutput(stepID string, output string) error
// Finish execution
Finish(success bool, summary string) error
// Close the display
Close() error
}
Display is the interface for rendering execution progress
func NewDisplay ¶
func NewDisplay(mode DisplayMode, verbose bool) Display
Factory creates a new Display instance based on mode
type DisplayMode ¶
type DisplayMode string
DisplayMode represents the output mode
const ( ModeSimple DisplayMode = "simple" // Simple text output ModeInteractive DisplayMode = "interactive" // Future TUI mode ModeJSON DisplayMode = "json" // JSON output for CI/CD )
type ExecutionProgress ¶
type ExecutionProgress struct {
Plan *config.ExecutionPlan
TotalSteps int
CompletedSteps int
CurrentStep string
StartTime time.Time
ElapsedTime time.Duration
EstimatedTime time.Duration
Steps []StepProgress
CurrentActivity string
Error error
}
ExecutionProgress represents the current execution state
type FileProgress ¶
type FileProgress struct {
Path string
Status StepStatus
Error error
Output string
Duration time.Duration
}
FileProgress represents progress of a single file execution
type ProgressTracker ¶
type ProgressTracker struct {
// contains filtered or unexported fields
}
ProgressTracker provides progress information to displays
func NewProgressTracker ¶
func NewProgressTracker(plan *config.ExecutionPlan, state *core.ExecutionState, display Display) *ProgressTracker
NewProgressTracker creates a new progress tracker
func (*ProgressTracker) Finish ¶
func (pt *ProgressTracker) Finish(success bool) error
Finish completes tracking
func (*ProgressTracker) Output ¶
func (pt *ProgressTracker) Output(stepID string, output string) error
Output shows output from a step
func (*ProgressTracker) SetState ¶
func (pt *ProgressTracker) SetState(state *core.ExecutionState)
SetState updates the state reference
func (*ProgressTracker) StepCompleted ¶
func (pt *ProgressTracker) StepCompleted(stepID string, duration time.Duration) error
StepCompleted notifies that a step has completed
func (*ProgressTracker) StepFailed ¶
func (pt *ProgressTracker) StepFailed(stepID string, err error) error
StepFailed notifies that a step has failed
func (*ProgressTracker) StepSkipped ¶
func (pt *ProgressTracker) StepSkipped(stepID string, reason string) error
StepSkipped notifies that a step was skipped
func (*ProgressTracker) StepStarted ¶
func (pt *ProgressTracker) StepStarted(stepID string) error
StepStarted notifies that a step has started
func (*ProgressTracker) Update ¶
func (pt *ProgressTracker) Update() error
Update updates the current progress
type StepProgress ¶
type StepProgress struct {
ID string
Description string
Status StepStatus
StartTime *time.Time
Duration time.Duration
Error error
Dependencies []string
Files []FileProgress
}
StepProgress represents progress of a single step
type StepStatus ¶
type StepStatus string
StepStatus represents the current status of a step
const ( StatusPending StepStatus = "pending" StatusRunning StepStatus = "running" StatusCompleted StepStatus = "completed" StatusFailed StepStatus = "failed" StatusSkipped StepStatus = "skipped" )
type TerminalDisplay ¶
type TerminalDisplay struct {
// contains filtered or unexported fields
}
TerminalDisplay implements Display for simple terminal output
func NewTerminalDisplay ¶
func NewTerminalDisplay(verbose bool) *TerminalDisplay
NewTerminalDisplay creates a new terminal display
func (*TerminalDisplay) Finish ¶
func (td *TerminalDisplay) Finish(success bool, summary string) error
Finish completes the display
func (*TerminalDisplay) Init ¶
func (td *TerminalDisplay) Init(ctx context.Context) error
Init initializes the display
func (*TerminalDisplay) ShowError ¶
func (td *TerminalDisplay) ShowError(stepID string, err error) error
ShowError displays an error
func (*TerminalDisplay) ShowOutput ¶
func (td *TerminalDisplay) ShowOutput(stepID string, output string) error
ShowOutput displays output from executors
func (*TerminalDisplay) Start ¶
func (td *TerminalDisplay) Start(plan *config.ExecutionPlan) error
Start begins display
func (*TerminalDisplay) UpdateProgress ¶
func (td *TerminalDisplay) UpdateProgress(progress *ExecutionProgress) error
UpdateProgress updates the progress display
func (*TerminalDisplay) UpdateStep ¶
func (td *TerminalDisplay) UpdateStep(stepID string, status StepStatus, message string) error
UpdateStep updates a step's status