Documentation
¶
Overview ¶
The package cli implements the command line interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer provides a simple ring buffer for buffering output from an output and error writer. Regular and error output are intermixed but on a line-level.
func NewRingBuffer ¶
func NewRingBuffer(lineCount, lineLength int) *RingBuffer
NewRingBuffer creates a new ring buffer with a maximum number of lines and line lengths.
func (*RingBuffer) Read ¶
func (rb *RingBuffer) Read(p []byte) (int, error)
Read reads a line from the ring buffer into the provided buffer. It returns the number of characters read or an error code. If there are no more lines to read, a length of 0 and io.EOF error is returned.
func (*RingBuffer) Reset ¶
func (rb *RingBuffer) Reset()
Reset resets the entire ring buffer (including line buffers)
func (*RingBuffer) StreamWriter ¶
func (rb *RingBuffer) StreamWriter() runtime.Stream
StreamReader returns a runtime Stream for the RingBuffer for StdOut and StdErr.
Click to show internal directories.
Click to hide internal directories.