Documentation ¶
Overview ¶
Package logbar implements a terminal UI component called a LogBar.
The top part, the "log", is a feed of newline-separated log messages.
The bottom part, the "bar", is a persistent status display that can be filled with any sorts of characters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogBar ¶
type LogBar struct {
// contains filtered or unexported fields
}
LogBar is a terminal component. Set its persistent lines with SetLine(), write to it with fmt.Fprint, fmt.Fprintf, and fmt.Fprintln.
func (*LogBar) Clean ¶
func (lb *LogBar) Clean()
Clean marks this LogBar as clean, and remembers its height. Call this once you write the LogBar out to a writer
func (*LogBar) Render ¶
Render a Buffer that can be written to an io.Writer to render this component to a terminal.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages writing a LogBar to an underlying io.Writer (ususally os.Stderr) at regular intervals, and also thread-safe updates to the LogBar.
If an error occurs when writing to the underlying writer, Manager panics.
func NewManager ¶
NewManager returns a new Manager