Versions in this module Expand all Collapse all v0 v0.2.5 Nov 1, 2026 v0.2.4 Oct 31, 2026 Changes in this version + const MaxCommands + const MaxReportBytes + const MaxReports + const MaxSlowest + const MaxStageTotals + const MaxStages + const SchemaVersion + var ErrInvalidID = errors.New("invalid diagnostics report ID") + var ErrInvalidReport = errors.New("invalid diagnostics report") + var ErrNotFound = errors.New("diagnostics report not found") + func Export(directory, id string, latest bool, output string) error + func Save(directory string, report Report) error + func ValidID(id string) bool + type CommandInfo struct + Operation string + type CommandRecord struct + DeadlineKind string + ElapsedMS int64 + ExitStatus *int + Failure *Failure + InFlight bool + QueueWaitMS int64 + Sequence uint64 + StartedMS int64 + StderrBytes int64 + StdoutBytes int64 + type CommandResult struct + DeadlineKind string + Elapsed time.Duration + ExitStatus *int + Failure *Failure + QueueWait time.Duration + StderrBytes int64 + StdoutBytes int64 + type Failure struct + Code string + Detail string + Kind string + Phase string + type Metadata struct + AppVersion string + Architecture string + BuildCommit string + BuildDate string + BuildModified bool + GitPath string + GitVersion string + GoVersion string + Operation string + Platform string + type Outcome struct + Cancelled bool + Cleanup []Failure + Primary *Failure + Status string + type Recorder struct + func New(metadata Metadata) *Recorder + func (r *Recorder) AddWorkload(delta Workload) + func (r *Recorder) BeginCommand(info CommandInfo) func(CommandResult) + func (r *Recorder) BeginStage(info StageInfo) func(*Failure) + func (r *Recorder) Finish(outcome Outcome) Report + func (r *Recorder) Snapshot() Report + type Report struct + DroppedCommands uint64 + DroppedInFlight uint64 + DroppedStages uint64 + ElapsedMS int64 + ID string + InFlightCommands []CommandRecord + LatestCommands []CommandRecord + Metadata Metadata + Outcome Outcome + SchemaVersion int + SlowestCommands []CommandRecord + Stages []StageRecord + StartedAt time.Time + Totals Totals + type StageInfo struct + Attempt int + Name string + Ref string + Repository string + Scope string + URL string + type StageRecord struct + ElapsedMS int64 + Failure *Failure + InFlight bool + Sequence uint64 + StartedMS int64 + type StageTotal struct + Attempts uint64 + Completed uint64 + ElapsedMS int64 + Failed uint64 + Name string + Scope string + Started uint64 + type Totals struct + CommandElapsedMS int64 + Commands uint64 + CompletedCommands uint64 + FailedCommands uint64 + QueueWaitMS int64 + StageTotals []StageTotal + Stages uint64 + StderrBytes int64 + StdoutBytes int64 + Workload Workload + type Workload struct + Attempts int64 + Bytes int64 + Checkouts int64 + Commits int64 + Files int64 + Repositories int64 + Scopes int64