Documentation
¶
Overview ¶
Package buffer provides a concurrency-safe, byte-bounded circular buffer.
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 retains only the newest bytes written to it. It implements io.Writer and is safe for concurrent readers and writers.
func New ¶
New creates a Buffer with the requested byte capacity. Non-positive capacities are clamped to one byte.
Click to show internal directories.
Click to hide internal directories.