Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CircularBuffer ¶
type CircularBuffer struct {
// contains filtered or unexported fields
}
func NewCircularBuffer ¶
func NewCircularBuffer(capacity int) *CircularBuffer
func (*CircularBuffer) Bytes ¶
func (cb *CircularBuffer) Bytes() []byte
func (*CircularBuffer) Write ¶
func (cb *CircularBuffer) Write(p string) error
Write accepts a string and stores it in the buffer. It expects entire lines and stores each line as a separate entry in the ring buffer.
func (*CircularBuffer) WriterAt ¶
func (cb *CircularBuffer) WriterAt(ctx context.Context, level log.Level) *io.PipeWriter
Click to show internal directories.
Click to hide internal directories.