Documentation
¶
Overview ¶
Package console renders engine progress at the CLI edge. It implements the clog-free progress.Reporter seam with a clog live display, so the pipeline and pure core stay free of any terminal dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter renders overall resolution progress as a single live line carrying a progress=done/total field. On a TTY clog updates the line in place; off a TTY (CI, pipes) it is suppressed entirely, since a progress line that never animates is just noise there. The per-marker detail the seam reports is aggregated into the one counter for now; a richer per-marker view can be added later without changing the seam.
func New ¶
New returns a Reporter rendering through logger, which the CLI configures (typically clog.Default writing to stderr).
func (*Reporter) Begin ¶
Begin starts one progress line totalling len(names) and returns a task per name, every one advancing the same counter as it reaches a terminal state. The returned wait blocks until the line has finished rendering.
func (*Reporter) Discovered ¶
Discovered logs the scan totals before resolution begins, or warns when no Clover comments were found at all.
func (*Reporter) Track ¶
Track starts the transient progress line labelled label and returns a handle the work drives with its running count. On a TTY clog animates a spinner carrying the live count - an open field=n when total is zero, a field=n/total fraction (with the resolve line's gradient) when it is positive - erased when the handle stops so the next log line supplants it; off a TTY (NonTTYSilent) it renders nothing.