Documentation ¶
Index ¶
Constants ¶
View Source
const ESC = 27
Variables ¶
View Source
var ( // DefaultInterval is the default amount of time to wait between each update to the screen. DefaultInterval = 50 * time.Millisecond // DefaultTerminalWidth is the default size of the output window when it cannot be determined automatically. DefaultTerminalWidth = 80 )
Functions ¶
This section is empty.
Types ¶
type Dator ¶
type Dator interface { io.WriteCloser // GetName returns the name of the Dator. GetName() string // GetLastLine returns the last line of output from the Dator, with leading and trailing spaces trimmed off. GetLastLine() string // IsClosed indicates that the Dator is closed and will provide no additional output. IsClosed() bool }
Dator provides an interface for an object that can provide the last line of output from, say, a command or event stream.
type DefaultDator ¶
DefaultDator is the default implementation of the Dator interface.
func (*DefaultDator) Close ¶
func (this *DefaultDator) Close() error
Close marks the Dator as closed.
func (*DefaultDator) GetLastLine ¶
func (this *DefaultDator) GetLastLine() string
GetLastLine returns the last line of output from the Dator, with leading and trailing spaces trimmed off.
func (*DefaultDator) GetName ¶
func (this *DefaultDator) GetName() string
GetName returns the name of the Dator.
func (*DefaultDator) IsClosed ¶
func (this *DefaultDator) IsClosed() bool
IsClosed indicates that the Dator is closed and will provide no additional output.
type Manidator ¶
type Manidator struct { // Interval is the amount of time to wait between each update to the screen. By default it is 50ms. Interval time.Duration // contains filtered or unexported fields }
func (*Manidator) Begin ¶
Begin launches the Manidator and displays the output from each registered Dator. The loop runs in its own goroutine, so this function returns immediately.
Click to show internal directories.
Click to hide internal directories.