MCPcopy
hub / github.com/etcd-io/bbolt / Bucket

Struct Bucket

bucket.go:30–44  ·  view source on GitHub ↗

Bucket represents a collection of key/value pairs inside the database.

Source from the content-addressed store, hash-verified

28
29// Bucket represents a collection of key/value pairs inside the database.
30type Bucket struct {
31 *common.InBucket
32 tx *Tx // the associated transaction
33 buckets map[string]*Bucket // subbucket cache
34 page *common.Page // inline page reference
35 rootNode *node // materialized node for the root page.
36 nodes map[common.Pgid]*node // node cache
37
38 // Sets the threshold for filling nodes when they split. By default,
39 // the bucket will fill to 50% but it can be useful to increase this
40 // amount if you know that your write workloads are mostly append-only.
41 //
42 // This is non-persisted across transactions so it must be set in every Tx.
43 FillPercent float64
44}
45
46// newBucket returns a new bucket associated with a transaction.
47func newBucket(tx *Tx) Bucket {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected