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

Function newBucket

bucket.go:47–54  ·  view source on GitHub ↗

newBucket returns a new bucket associated with a transaction.

(tx *Tx)

Source from the content-addressed store, hash-verified

45
46// newBucket returns a new bucket associated with a transaction.
47func newBucket(tx *Tx) Bucket {
48 var b = Bucket{tx: tx, FillPercent: DefaultFillPercent}
49 if tx.writable {
50 b.buckets = make(map[string]*Bucket)
51 b.nodes = make(map[common.Pgid]*node)
52 }
53 return b
54}
55
56// Tx returns the tx of the bucket.
57func (b *Bucket) Tx() *Tx {

Callers 2

initMethod · 0.85
openBucketMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected