Documentation ¶
Index ¶
- type Ring
- func (r *Ring) Back() (value int64)
- func (r *Ring) Cap() int
- func (r *Ring) CopyTo(dst []int64) (n int)
- func (r *Ring) ForcePushBack(value int64)
- func (r *Ring) Front() (value int64)
- func (r *Ring) Full() bool
- func (r *Ring) Len() int
- func (r *Ring) PopFront() (value int64)
- func (r *Ring) PushBack(value int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ring ¶
type Ring struct {
// contains filtered or unexported fields
}
Ring is a fixed-size circular buffer.
func (*Ring) CopyTo ¶
Copy makes copy of the ring buffer to dst slice. Returns count of copied items.
func (*Ring) ForcePushBack ¶
ForcePushBack adds new item to the end of buffer and deletes first item if buffer is full.
Click to show internal directories.
Click to hide internal directories.