progress

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 13 Imported by: 19

Documentation

Index

Constants

View Source
const (
	PrinterModeAuto  = "auto"
	PrinterModeTty   = "tty"
	PrinterModePlain = "plain"
	PrinterModeQuiet = "quiet"
)

Variables

This section is empty.

Functions

func FromReader

func FromReader(w Writer, name string, rc io.ReadCloser)

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)

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, w io.Writer, out console.File, mode string) *Printer

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)

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)
}

func ResetTime

func ResetTime(in Writer) 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