package
Version:
v0.0.0-...-44b753e
Opens a new window with list of versions in this module.
Published: Jun 28, 2016
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package buffer provides a thread-safe buffer implementation for a ring
buffer.
Ring is a ring buffer implementation wrapping queue.Circular.
NewRing returns a ring buffer initalized with 'size' slots.
func (r *Ring) Enqueue(item interface{}) error
Enqueue enques an item, If the buffer is full, the oldest item will
be evicted.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.