progress

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 19

Documentation

Index

Constants

This section is empty.

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

func (*Printer) Wait added in v0.5.0

func (p *Printer) Wait() error

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