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

Function GetRootPage

internal/guts_cli/guts_cli.go:116–122  ·  view source on GitHub ↗

GetRootPage returns the root-page (according to the most recent transaction).

(path string)

Source from the content-addressed store, hash-verified

114
115// GetRootPage returns the root-page (according to the most recent transaction).
116func GetRootPage(path string) (root common.Pgid, activeMeta common.Pgid, err error) {
117 m, id, err := GetActiveMetaPage(path)
118 if err != nil {
119 return 0, id, err
120 }
121 return m.RootBucket().RootPage(), id, nil
122}
123
124// GetActiveMetaPage returns the active meta page and its page ID (0 or 1).
125func GetActiveMetaPage(path string) (*common.Meta, common.Pgid, error) {

Callers 3

RevertMetaPageFunction · 0.92
FindPathsToKeyMethod · 0.92
readMetaPageFunction · 0.92

Calls 3

GetActiveMetaPageFunction · 0.85
RootPageMethod · 0.80
RootBucketMethod · 0.80

Tested by 1

readMetaPageFunction · 0.74