package
module
Version:
v0.0.0-...-23e758e
Opens a new window with list of versions in this module.
Published: Jan 25, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
ring
A wrapper over container/ring that adds thread-safety and helper functions.
Documentation
¶
type Ring[T any] struct {
}
Ring wraps container/ring and adds thread-safety and helper functions.
Use New to create a new instance with a given size.
New returns a pointer to a new instance of Ring.
func (r *Ring[T]) Add(v T)
Add an item
func (r *Ring[T]) Slice() []T
Source Files
¶
Click to show internal directories.
Click to hide internal directories.