Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotatingBuffer ¶
type RotatingBuffer struct {
// contains filtered or unexported fields
}
RotatingLogBuffer splits incoming logs based on the write number of lines are limited to a specified number, then cuts off the oldest entry
Example:
limit = 3 buf[0] = "hello" buf[1] = "world" buf[2] = "!"
When another is written:
limit = 3 buf[0] = "Lorum" buf[1] = "hello" buf[2] = "world"
func NewRotatingBuffer ¶
func NewRotatingBuffer(limit int) *RotatingBuffer
NewRotatingBuffer initalized with limit
func (*RotatingBuffer) String ¶
func (rb *RotatingBuffer) String() string
String returns all the currently stored byte slices concatentated together into a string.
Click to show internal directories.
Click to hide internal directories.