Documentation ¶
Overview ¶
package buffer provides an mmap'd circular buffer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
func New ¶
New creates a new Buffer backed by the file given by filename. it's max capacity is set to the capacity given
func (*Buffer) Insert ¶
Insert inserts the data into the buffer Inserting data which will overflow the buffer fails Inserting does not overwrite any existing data inside the buffer if it would overwrite data, errOverwrite is returned
func (*Buffer) Peek ¶
Peek reads the first record and returns it without removing it from the buffer.
Click to show internal directories.
Click to hide internal directories.