Package buffer provides a simple ring buffer for storing local data
Buffer is ring buffer
New returns a new buffer of the given size
Get returns the last n entries
func (b *Buffer) Put(v interface{})
Put adds a new value to ring buffer
Return the entries since a specific time
Size returns the size of the ring buffer
Stream logs from the buffer
type Entry struct {
Value interface{}
Timestamp time.Time
}
Entry is ring buffer data entry