 package
    
    
    
      package
    
    
      
        
      
    
   
    
      
  
    
      
  
    
      Version: 
        v0.20.0
    
    
      Opens a new window with list of versions in this module.
    
    
    
  
      
  
    Published: Jul 17, 2021
  
      
  
    License: MIT
      
    
  
  
    Opens a new window with license information.
  
      
        
  
    
      Imports: 3
    
  
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by: 0
    
  
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
    
      
    
    
    
  
    
      
      
        
          
  
    
       Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    
      
        
 
    
Package ring 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
Close the channel when you want to stop
  
   
  
     
      
  
  
    
    
    
      type Entry struct {
	Value     interface{}
	Timestamp time.Time
}
     
  Entry is ring buffer data entry
  
     
      
  
  
    
    
    
  Stream is used to stream the buffer
  
       
      
     
   
        
      
      
        
  
    
       Source Files
      ¶
      Source Files
      ¶
    
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.