Skip to main content

Module progress

Module progress 

Source
Expand description

Minimal internal progress abstraction for Export/Import V2.

This is intentionally small and log/internal oriented. It does not touch stdout and is safe for non-interactive runs. LogProgress backs the import-v2 --progress flag for non-interactive runs by routing events to stderr, while IndicatifProgress renders an interactive bar on a TTY. Both implement ProgressReporter, so call sites stay agnostic.

Structsยง

IndicatifProgress ๐Ÿ”’
A reporter that renders an interactive progress bar via indicatif.
LogProgress ๐Ÿ”’
A lightweight reporter that logs phase lifecycle and progress through the stderr. It never touches stdout, so it is safe for non-interactive runs and keeps dry-run output clean.
NoopProgress ๐Ÿ”’
A reporter that discards every event. Used as the production default and in tests that do not care about progress.
PhaseState ๐Ÿ”’
ProgressPhase ๐Ÿ”’
RAII guard for a started progress phase.

Enumsยง

ProgressMode ๐Ÿ”’
Controls progress reporting for Export/Import V2.
ProgressOutputKind ๐Ÿ”’

Traitsยง

ProgressReporter ๐Ÿ”’
Receives progress events from long-running Export/Import V2 work.

Functionsยง

build_progress_reporter ๐Ÿ”’
Builds the progress reporter for mode. never is silent; otherwise an interactive bar is used on TTY stderr, falling back to lightweight log progress when stderr is redirected.
progress_bar_supported ๐Ÿ”’
progress_output_kind ๐Ÿ”’
Selects the progress output style for mode given whether stderr is a TTY and whether the terminal environment is suitable for progress-bar control sequences.
term_supports_progress_bar ๐Ÿ”’
write_progress_line ๐Ÿ”’