progress

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannel added in v0.5.0

func NewChannel(w Writer) (chan *client.SolveStatus, chan struct{})

func Wrap

func Wrap(name string, l Logger, fn func(SubLogger) error) (err error)

func Write

func Write(w Writer, name string, f func() error) error

func WriteBuildRef added in v0.11.0

func WriteBuildRef(w Writer, target string, ref string)

Types

type Logger

type Logger func(*client.SolveStatus)

type Printer added in v0.5.0

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

func NewPrinter

func NewPrinter(ctx context.Context, out console.File, mode progressui.DisplayMode, opts ...PrinterOpt) (*Printer, error)

func (*Printer) BuildRefs added in v0.11.0

func (p *Printer) BuildRefs() map[string]string

func (*Printer) ClearLogSource added in v0.8.0

func (p *Printer) ClearLogSource(v interface{})

func (*Printer) IsDone added in v0.17.0

func (p *Printer) IsDone() bool

func (*Printer) Pause added in v0.11.0

func (p *Printer) Pause() error

func (*Printer) Unpause added in v0.11.0

func (p *Printer) Unpause()

func (*Printer) ValidateLogSource added in v0.8.0

func (p *Printer) ValidateLogSource(dgst digest.Digest, v interface{}) bool

func (*Printer) Wait added in v0.5.0

func (p *Printer) Wait() error

func (*Printer) Warnings added in v0.8.0

func (p *Printer) Warnings() []client.VertexWarning

func (*Printer) Write added in v0.5.0

func (p *Printer) Write(s *client.SolveStatus)

func (*Printer) WriteBuildRef added in v0.11.0

func (p *Printer) WriteBuildRef(target string, ref string)

type PrinterOpt added in v0.11.0

type PrinterOpt func(b *printerOpts)

func WithDesc added in v0.11.0

func WithDesc(text string, console string) PrinterOpt

func WithMetrics added in v0.13.0

func WithMetrics(mp metric.MeterProvider, attrs attribute.Set) PrinterOpt

func WithOnClose added in v0.11.0

func WithOnClose(onclose func()) PrinterOpt

func WithPhase added in v0.11.0

func WithPhase(phase string) PrinterOpt

type SubLogger

type SubLogger interface {
	Wrap(name string, fn func() error) error
	Log(stream int, dt []byte)
	SetStatus(*client.VertexStatus)
}

type Writer

type Writer interface {
	Write(*client.SolveStatus)
	WriteBuildRef(string, string)
	ValidateLogSource(digest.Digest, interface{}) bool
	ClearLogSource(interface{})
}

func ResetTime

func ResetTime(in Writer) Writer

func Tee added in v0.11.0

func Tee(w Writer, ch chan *client.SolveStatus) Writer

func WithPrefix added in v0.5.0

func WithPrefix(w Writer, pfx string, force bool) Writer

Jump to

Keyboard shortcuts

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