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

Method forEachPage

bucket.go:700–709  ·  view source on GitHub ↗

forEachPage iterates over every page in a bucket, including inline pages.

(fn func(*common.Page, int, []common.Pgid))

Source from the content-addressed store, hash-verified

698
699// forEachPage iterates over every page in a bucket, including inline pages.
700func (b *Bucket) forEachPage(fn func(*common.Page, int, []common.Pgid)) {
701 // If we have an inline page then just use that.
702 if b.page != nil {
703 fn(b.page, 0, []common.Pgid{b.RootPage()})
704 return
705 }
706
707 // Otherwise traverse the page hierarchy.
708 b.tx.forEachPage(b.RootPage(), fn)
709}
710
711// forEachPageNode iterates over every page (or node) in a bucket.
712// This also includes inline pages.

Callers 1

StatsMethod · 0.95

Calls 1

RootPageMethod · 0.80

Tested by

no test coverage detected