Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer implements a circular buffer. It is a fixed size, and new writes overwrite older data, such that for a buffer of size N, for any amount of writes, only the last N bytes are retained.
func NewBuffer ¶
NewBuffer creates a new buffer of a given size. NewBuffer panics if the size is not greater than 0.
func (*Buffer) Bytes ¶
Bytes provides a slice of the bytes written. This slice should not be written to.
func (*Buffer) ResetTotalWritten ¶
func (b *Buffer) ResetTotalWritten()
ResetTotalWritten resets the TotalWritten count.
func (*Buffer) TotalWritten ¶
TotalWritten provides the total number of bytes written
Click to show internal directories.
Click to hide internal directories.