Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CircularBuffer ¶ added in v0.118.0
type CircularBuffer struct {
// contains filtered or unexported fields
}
func NewCircularBuffer ¶ added in v0.118.0
func NewCircularBuffer(capacity int) *CircularBuffer
func (*CircularBuffer) Bytes ¶ added in v0.118.0
func (cb *CircularBuffer) Bytes() []byte
func (*CircularBuffer) Write ¶ added in v0.118.0
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 ¶ added in v0.118.0
func (cb *CircularBuffer) WriterAt(ctx context.Context, level log.Level) *io.PipeWriter
Click to show internal directories.
Click to hide internal directories.