Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool coordinates progress bars and log output sharing the same terminal.
cheggaaa/pb's own Pool redraws bars on its own ticker goroutine, which races with anything else writing to the terminal (like our logger) and corrupts the display. ipfs/kubo avoids that by funnelling both the bar and its other output through a single sequenced writer that clears the bar line before printing and redraws it after; Pool does the same thing here, generalised to any number of bars, with its own ticker driving the redraw rate so bar updates from many goroutines don't each trigger a terminal write.
func NewPool ¶
func NewPool(environment env.Environment) *Pool
NewPool initialises a pool. Bars are only drawn outside of production.