Documentation
¶
Index ¶
Constants ¶
const ( // ModeAuto detect console capabilities ModeAuto = "auto" // ModeTTY use terminal capability for advanced rendering ModeTTY = "tty" // ModePlain dump raw events to output ModePlain = "plain" // ModeQuiet don't display events ModeQuiet = "quiet" // ModeJSON outputs a machine-readable JSON stream ModeJSON = "json" )
const (
DRYRUN_PREFIX = " DRY-RUN MODE - "
)
Variables ¶
var ( DoneColor colorFunc = aec.BlueF.Apply TimerColor colorFunc = aec.BlueF.Apply CountColor colorFunc = aec.YellowF.Apply WarningColor colorFunc = aec.YellowF.With(aec.Bold).Apply SuccessColor colorFunc = aec.GreenF.Apply ErrorColor colorFunc = aec.RedF.With(aec.Bold).Apply PrefixColor colorFunc = aec.CyanF.Apply )
var Mode = ModeAuto
Mode is the effective progress rendering mode for the current command.
It starts as ModeAuto and is resolved during command setup by selectEventProcessor (cmd/compose), which assigns the mode matching the renderer it returns — so code running after setup never observes ModeAuto. The only other writers are the `--quiet` flags of `run` and `build`, which force ModeQuiet from their PreRun hooks.
Functions ¶
func Full ¶
func Full(out io.Writer, info io.Writer, detached bool, opts ...TermOption) api.EventProcessor
Full creates the terminal EventProcessor, built on a model/layout/screen split:
- tty_model.go — event reducer, pure data, injected clock
- tty_layout.go — pure (model, size, now) → lines, every line ≤ width
- tty_screen.go — diff-based repaint of the block, single Write per frame
The writer itself only coordinates: a mutex guards the model and the screen, and the refresh goroutine is stopped through context cancellation so no lifecycle transition can block (Done after Ctrl-C included).
func Quiet ¶
func Quiet() api.EventProcessor
Types ¶
type TermOption ¶ added in v5.6.0
type TermOption func(*termWriter)
TermOption customizes the Full EventProcessor.
func WithDryRun ¶ added in v5.6.0
func WithDryRun() TermOption
WithDryRun prefixes every row with the dry-run marker.