Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ring ¶
type Ring[T any] struct { // contains filtered or unexported fields }
A Ring is a generic container/ring.Ring with convenient methods for adding and removing values. The generic type T should be a pointer type or interface because the default value of T will be returned by Pop and Peek if the value is unset.
func (*Ring[T]) Add ¶
func (r *Ring[T]) Add(block T)
Add adds a value to the RingBuffer, overwriting the oldest value if full
 Click to show internal directories. 
   Click to hide internal directories.