progresswriter

package
v0.16.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MultiWriter

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

func NewMultiWriter

func NewMultiWriter(pw Writer) *MultiWriter

func (*MultiWriter) Done

func (mw *MultiWriter) Done() <-chan struct{}

func (*MultiWriter) Err

func (mw *MultiWriter) Err() error

func (*MultiWriter) Status

func (mw *MultiWriter) Status() chan *client.SolveStatus

func (*MultiWriter) WithPrefix

func (mw *MultiWriter) WithPrefix(pfx string, force bool) Writer

type SubLogger

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

type Writer

type Writer interface {
	Done() <-chan struct{}
	Err() error
	Status() chan *client.SolveStatus
}

func NewPrinter

func NewPrinter(ctx context.Context, out console.File, mode string) (Writer, error)

func ResetTime

func ResetTime(in Writer) Writer

func Tee

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

Jump to

Keyboard shortcuts

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