progress

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY(w io.Writer) bool

IsTTY reports whether w is an *os.File pointing at a terminal or cygwin pty.

Types

type Layer

type Layer interface {
	Written(n int64)
	Done()
	Fail(err error)
}

type Reporter

type Reporter interface {
	Phase(name string)
	StartLayer(d digest.Digest, totalBytes int64, encoding string) Layer
	Finish()
}

func FromWriter

func FromWriter(w io.Writer) Reporter

func NewAuto

func NewAuto(w io.Writer) Reporter

func NewBars

func NewBars(w io.Writer) Reporter

NewBars returns a multi-bar reporter backed by mpb. If w is not a TTY, mpb would swallow its output (cursor escapes are unsafe on a pipe/file), so NewBars degrades to the line reporter — users that explicitly passed --progress=bars into a non-TTY sink still see layer progress, just without animation.

func NewDiscard

func NewDiscard() Reporter

func NewLine

func NewLine(w io.Writer) Reporter

type SlogWriterProvider

type SlogWriterProvider interface {
	SlogWriter() io.Writer
}

Jump to

Keyboard shortcuts

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