An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/nsf/ringbuffer

Package provides fixed length FIFO ring buffer functionality. You can use a generic data structure with methods, which is forced to use slices due to Go language limitations (no generic array lengths): Or you can use generic functions with your own state variables. Here you can use plain arrays and integer types of arbitrary size: The logic is the simplest implementation straight from wikipedia: https://en.wikipedia.org/wiki/Circular_buffer. In short: there are read and write pointers as integer indices and a buffer of capacity+1 space. An extra element is reserved to distinguish between full/empty state. When using plain generic functions with smaller integer types, be aware of integer overflows. No care taken to prevent these.

Ecosystem
proxy.golang.org
Latest Release
v1.0.1
about 1 year ago
Versions
2
Past Dependents
Include Past Dependents

Check this option to include packages that no longer depend on this package in their latest version but previously did.

Filter
Filter by Kind
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/nsf/ringbuffer
spec
License MIT
Namespace github.com/nsf
First Release about 1 year ago
Last Synced 8 days ago
Repository
Stars 1 on GitHub
Forks 0 on GitHub
Rankings on proxy.golang.org
Overall Top 6.1%