Categorygithub.com/cloudflare/buffer
repositorypackage
0.0.0-20240920015230-2ceb2abd7905
Repository: https://github.com/cloudflare/buffer.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

buffer

This package provides a circular buffer implementation backed by an MMAP'd file. It's purpose is to provide a simple interface for storing arbitrary records backed by a file which can handle failures and is suitable for concurrent access.

Specifically, this is a fork of ashishgandhi's buffer implementation which suits our needs more effectively. Namely, insertions into a full buffer do not overwrite existing records. Instead an error is returned to the caller forcing a decision on how to handle.

At this time, Cloudflare provides no guarantees about the stability of this package. Please use vendoring to maintain this dependency in your project.