console

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 2

README

Console UI

The console UI is based on Buildkit's, which was pretty much perfect. The original authors at time of extraction are listed in AUTHORS.

Documentation

Index

Constants

View Source
const AntiFlicker = 5 * time.Second

AntiFlicker is used to prevent bouncing between concurrent vertices too aggressively.

View Source
const MaxDelay = 10 * time.Second

MaxDelay is the maximum amount of time to favor the current vertex over other active vertices.

View Source
const MinProgressDelta = 0.05 // %

MinProgressDelta is the minimum progress percent to require before printing updates to a task.

View Source
const MinTimeDelta = 5 * time.Second

MinTimeDelta is the minimum amount of time to require before printing updates to a task.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter(w io.Writer, opts ...WriterOpt) progrock.Writer

Types

type Components

type Components struct {
	TextContextSwitched           string
	TextLogFormat                 string
	TextVertexRunning             string
	TextVertexCanceled            string
	TextVertexErrored             string
	TextVertexCached              string
	TextVertexDone                string
	TextVertexDoneDuration        string
	TextVertexGroup               string
	TextVertexTask                string
	TextVertexTaskDuration        string
	TextVertexTaskProgressBound   string
	TextVertexTaskProgressUnbound string

	RunningDuration, DoneDuration string
}

func DefaultUI

func DefaultUI(out *termenv.Output) Components

type Writer

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

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) WriteStatus

func (w *Writer) WriteStatus(status *progrock.StatusUpdate) error

type WriterOpt

type WriterOpt func(*Writer)

func ShowInternal

func ShowInternal(show bool) WriterOpt

func WithClock

func WithClock(clock clockwork.Clock) WriterOpt

func WithMessageLevel added in v0.10.0

func WithMessageLevel(level progrock.MessageLevel) WriterOpt

func WithUI

func WithUI(ui Components) WriterOpt

Jump to

Keyboard shortcuts

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