progress

package
v0.182.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Heartbeat = 10 * time.Second

Variables

This section is empty.

Functions

func Output

func Output(out io.Writer, interactive bool) io.Writer

Types

type Campaign

type Campaign struct {
	// contains filtered or unexported fields
}

Campaign adapts typed engine events to the shared one-line terminal renderer. Machine-readable command output remains exclusively on stdout.

func NewCampaign

func NewCampaign(out io.Writer, enabled bool, operation string) *Campaign

func NewCampaignWithHeartbeat

func NewCampaignWithHeartbeat(out io.Writer, enabled bool, operation string, heartbeat time.Duration) *Campaign

func (*Campaign) Finish

func (p *Campaign) Finish(message string)

func (*Campaign) Report

func (p *Campaign) Report(event engineprogress.Event)

func (*Campaign) Reporter

func (p *Campaign) Reporter() engineprogress.Reporter

type Checks

type Checks struct {
	// contains filtered or unexported fields
}

func NewChecks

func NewChecks(out io.Writer, enabled bool) *Checks

func NewChecksWithHeartbeat

func NewChecksWithHeartbeat(out io.Writer, enabled bool, heartbeat time.Duration) *Checks

func (*Checks) Fail

func (progress *Checks) Fail(err error)

func (*Checks) Finish

func (progress *Checks) Finish(result githubchecks.PullRequestWaitResult)

func (*Checks) FinishOperation

func (progress *Checks) FinishOperation(message string)

func (*Checks) OperationReporter

func (progress *Checks) OperationReporter(operation string) progresspkg.Reporter

func (*Checks) Report

func (progress *Checks) Report(event githubchecks.PullRequestWaitProgress)

func (*Checks) Start

func (progress *Checks) Start(repository, pullRequest, target, head string)

func (*Checks) Update

func (p *Checks) Update(message string)

Update renders a caller-specific operation message using the same progress sink.

type Live

type Live struct {
	// contains filtered or unexported fields
}

Live renders one replaceable terminal line. Commands keep their machine-readable report on stdout and send short-lived human progress here, on stderr. The mutex lets parallel repository workers report safely.

func NewLive

func NewLive(out io.Writer, enabled bool) *Live

func NewLiveWithHeartbeat

func NewLiveWithHeartbeat(out io.Writer, enabled bool, heartbeat time.Duration) *Live

func (*Live) Enabled

func (p *Live) Enabled() bool

Enabled reports whether this renderer emits progress.

func (*Live) Finish

func (progress *Live) Finish(message string)

func (*Live) PrintLine

func (progress *Live) PrintLine(message string)

PrintLine writes one immediate, already-terminated line and returns without touching the replaceable-line/elapsed-suffix/heartbeat machinery the rest of this type provides. Use it for callers whose message already carries its own timing — `wb run`'s queued/admitted/done receipts compute their own elapsed durations, so wrapping them in withElapsed would print a redundant second duration.

func (*Live) Start

func (progress *Live) Start(message string)

func (*Live) Update

func (progress *Live) Update(message string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL