Registry / utility / libp2p-go-buffer-pool

libp2p-go-buffer-pool

JSON →
library0.1.0gogounverified

Package pool provides a sync.Pool equivalent that buckets incoming requests to one of 32 sub-pools, one for each power of 2, 0-32.

go get github.com/libp2p/go-buffer-pool
INSTALL
IMPORT
SIG · LIBP2P-GO-BUFFER-P
L
libp2p-go-buffer-pool
utilitygov0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pool
github.com/libp2p/go-buffer-pool

Get a buffer of size 1024 from the pool and return it.

package main import ( "fmt" pool "github.com/libp2p/go-buffer-pool" ) func main() { buf := pool.Get(1024) defer pool.Put(buf) fmt.Println(len(buf)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
libp2p-go-buffer-pool — go get libp2p-go-buffer-pool · libregistry