...

Source file src/github.com/jedib0t/go-pretty/v6/progress/writer.go

Documentation: github.com/jedib0t/go-pretty/v6/progress

     1  package progress
     2  
     3  import (
     4  	"io"
     5  	"time"
     6  )
     7  
     8  // Writer declares the interfaces that can be used to setup and render a
     9  // Progress tracker with one or more trackers.
    10  type Writer interface {
    11  	AppendTracker(tracker *Tracker)
    12  	AppendTrackers(trackers []*Tracker)
    13  	IsRenderInProgress() bool
    14  	Length() int
    15  	LengthActive() int
    16  	LengthDone() int
    17  	LengthInQueue() int
    18  	Log(msg string, a ...interface{})
    19  	SetAutoStop(autoStop bool)
    20  	SetMessageWidth(width int)
    21  	SetNumTrackersExpected(numTrackers int)
    22  	SetOutputWriter(output io.Writer)
    23  	SetSortBy(sortBy SortBy)
    24  	SetStyle(style Style)
    25  	SetTrackerLength(length int)
    26  	SetTrackerPosition(position Position)
    27  	// Deprecated: in favor of Style().Visibility.ETA
    28  	ShowETA(show bool)
    29  	// Deprecated: in favor of Style().Visibility.TrackerOverall
    30  	ShowOverallTracker(show bool)
    31  	// Deprecated: in favor of Style().Visibility.Percentage
    32  	ShowPercentage(show bool)
    33  	// Deprecated: in favor of Style().Visibility.Time
    34  	ShowTime(show bool)
    35  	// Deprecated: in favor of Style().Visibility.Tracker
    36  	ShowTracker(show bool)
    37  	// Deprecated: in favor of Style().Visibility.Value
    38  	ShowValue(show bool)
    39  	SetUpdateFrequency(frequency time.Duration)
    40  	Stop()
    41  	Style() *Style
    42  	Render()
    43  }
    44  
    45  // NewWriter initializes and returns a Writer.
    46  func NewWriter() Writer {
    47  	return &Progress{}
    48  }
    49  

View as plain text