Registry / database / nebulouslabs-bolt

nebulouslabs-bolt

JSON →
library1.4.4gogounverified

A pure Go key/value store with ACID transactions, MVCC, and a B+tree data model, optimized for fast reads and crash recovery.

go get gitlab.com/NebulousLabs/bolt
INSTALL
IMPORT
SIG · NEBULOUSLABS-BOLT
N
nebulouslabs-bolt
databasegov1.4.4
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.

bolt
gitlab.com/NebulousLabs/bolt

Open a database, create a bucket, insert and retrieve a key-value pair.

package main import ( "fmt" "gitlab.com/NebulousLabs/bolt" ) func main() { db, _ := bolt.Open("my.db", 0600, nil) defer db.Close() db.Update(func(tx *bolt.Tx) error { b, _ := tx.CreateBucket([]byte("MyBucket")) return b.Put([]byte("key"), []byte("value")) }) db.View(func(tx *bolt.Tx) error { b := tx.Bucket([]byte("MyBucket")) v := b.Get([]byte("key")) fmt.Printf("Value: %s\n", v) return nil }) }
Debug
Known issues
breakingKeys and values are only valid within the transaction; using them outside causes panics.
fix
Copy data out of the transaction if needed for later use.
affects: >=1.0.0
Upgrade
Version history
1.4.4latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
nebulouslabs-bolt — go get nebulouslabs-bolt · libregistry