Documentation
¶
Overview ¶
Package progress carries a download-progress sink through context.Context so the git/installer/app layers can report fetch progress to the CLI without any signature changes. Every emitter no-ops when no sink is installed, so non-interactive runs are structurally unchanged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
Repo string // display name, e.g. "acme/skills"
Skill string // manifest skill name; empty outside `install`
Index int // 1-based repo counter for [k/N]; 0 outside `install`
Count int // total repos for [k/N]; 0 outside `install`
Commit string // resolved commit when known
Phase Phase
Percent int // 0..100; -1 when git reported no totals
Objects int64 // "a" of git's "(a/b)" counter
Total int64 // "b" of git's "(a/b)" counter; 0 = unknown
Detail string // verbatim human tail from git, e.g. "4.1 MiB | 2.3 MiB/s"
}
Event is one progress observation. Layers closer to the CLI stamp the identifying fields (Repo, Skill, Index, Count) via Stamp.
type Phase ¶
type Phase int
Phase identifies where in a source download an Event was emitted.
const ( // PhaseResolving marks a ref-resolution round-trip (ls-remote) starting. PhaseResolving Phase = iota // PhaseResolved marks the revision as known; Commit is set. PhaseResolved // PhaseCached marks a content-cache hit: no network fetch will happen. PhaseCached // PhaseFetching marks a git fetch starting for Repo at Commit. PhaseFetching // PhaseCounting mirrors git's "Counting/Compressing objects" progress. PhaseCounting // PhaseReceiving mirrors git's "Receiving objects" progress. PhaseReceiving // PhaseDeltas mirrors git's "Resolving deltas" progress. PhaseDeltas // PhaseDone marks the fetched tree as materialized into the cache. PhaseDone )
Click to show internal directories.
Click to hide internal directories.