Documentation ¶
Overview ¶
Package ringbuffer contains a ring buffer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer is a ring buffer.
func (*RingBuffer) Pull ¶
func (r *RingBuffer) Pull() (interface{}, bool)
Pull pulls data from the beginning of the buffer.
func (*RingBuffer) Push ¶
func (r *RingBuffer) Push(data interface{}) bool
Push pushes data at the end of the buffer.
func (*RingBuffer) Reset ¶
func (r *RingBuffer) Reset()
Reset restores Pull() behavior after a Close().
Click to show internal directories.
Click to hide internal directories.