Registry / database / peterbourgon-diskv-v3

peterbourgon-diskv-v3

JSON →
library3.0.1gogounverified

A disk-backed key-value store for Go with configurable serialization and caching.

go get github.com/peterbourgon/diskv/v3
INSTALL
IMPORT
SIG · PETERBOURGON-DISKV
P
peterbourgon-diskv-v3
databasegov3.0.1
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.

diskv
github.com/peterbourgon/diskv/v3

Creates a diskv store, writes a key-value pair, and reads it back.

package main import ( "fmt" "github.com/peterbourgon/diskv/v3" ) func main() { d := diskv.New(diskv.Options{ BasePath: "/tmp/mystore", Transform: func(s string) []string { return []string{} }, CacheSizeMax: 1024 * 1024, }) d.Write("key", []byte("value")) value, err := d.Read("key") if err != nil { panic(err) } fmt.Println("Value:", string(value)) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
peterbourgon-diskv-v3 — go get peterbourgon-diskv-v3 · libregistry