progress

package
v0.97.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package progress defines the transport-neutral event contract used by long-running WB operations. Engines never write terminal output directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index added in v0.52.0

func Index(value int) *int

Index returns a stable pointer for an optional zero-based event index.

func Report

func Report(reporter Reporter, event Event)

Report invokes reporter when configured.

Types

type Event

type Event struct {
	Operation  string
	Phase      string
	Repository string
	Detail     string
	State      State
	Completed  int
	Total      int
	Wave       int
	Layer      *int
}

Event is one progress observation. Completed and Total refer to repositories or releases; Wave and Layer identify ordered campaigns. Layer is a pointer because layer zero is meaningful and must remain distinguishable from an operation that has no layer.

type Reporter

type Reporter func(Event)

Reporter receives progress events. Engines may call a reporter concurrently, so implementations must be concurrency-safe and return promptly. A nil reporter disables reporting.

type State

type State string

State describes the lifecycle of one operation or repository phase.

const (
	Started   State = "started"
	Running   State = "running"
	Completed State = "completed"
	Failed    State = "failed"
	Waiting   State = "waiting"
)

Jump to

Keyboard shortcuts

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