github.com/xuoe/go-ring (go): Package ring provides a generic ring buffer implementation.  The ring buffer is a FIFO queue with limited capacity. Once the capacity is reached, values are discarded from the tail end of the buffer to accommodate the ones being pushed at the head, the other end.  Values can be pushed, popped and retrieved (from any index) in O(1) time.
Keywords: circular-buffer|ring-buffer