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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/ericlagergren/tape

Package tape implements a file-based FIFO queue. The typical use case is to use an os.File as backing storage and has special handling for this use case. However, any type that implements io.ReaderAt and io.WriterAt can be used. The documentation is written with the assumption that the backing storage is an os.File. The queue does not support the "pop" operation. This prevents callers from accidentally removing data from the queue before the operation that uses the data is successful. The queue does not shrink as elements are removed. To shrink the queue, wait until its size drops to zero call Reset once or just it and create a new one. The queue is designed to be resilient against corruption from power loss and program crashes. For example, if an addition to the queue fails partway through, the queue will remain uncorrupted so long as the 32-byte queue header is updated atomically (or not at all). Queue operations are flushed to disk after each operation. On macOS and iOS, operations are flushed to disk using fcntl(F_BARRIERFSYNC) instead of calling Sync. This is because Sync uses fcntl(F_FULLFSYNC) which (objectively) has horrendous performance and, according to Apple, usually isn't necessary. For more information, see Apple's documentation1. Example usage (error handing is omitted for brevity): It is heavily based off Square's Tape library0.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ericlagergren/tape
License: Apache-2.0
Latest release: about 2 years ago
First release: about 3 years ago
Namespace: github.com/ericlagergren
Stars: 0 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 months ago

    Loading...
    Readme
    Loading...