progress

package
v0.76.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, r Reporter) context.Context

NewContext returns a copy of ctx carrying r so that the runtime layer can pick it up during PullImage.

Types

type Reporter

type Reporter interface {
	// Start registers an image whose pull is beginning.
	Start(image string)
	// Update the progress bar, status is some text
	// like "Downloading", "Extracting". percent is the completion percentage (0-1)
	Update(image, status string, percent float64)
	// Done marks an image pull as done.
	Done(image string, err error)
}

func FromContext

func FromContext(ctx context.Context) Reporter

FromContext returns the Reporter stored in ctx, or nil if none was set. A nil return signals callers to use their legacy single-image progress rendering.

func New

func New(w io.Writer) (Reporter, func())

Jump to

Keyboard shortcuts

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