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

Method Typ

internal/common/page.go:48–59  ·  view source on GitHub ↗

Typ returns a human-readable page type string used for debugging.

()

Source from the content-addressed store, hash-verified

46
47// Typ returns a human-readable page type string used for debugging.
48func (p *Page) Typ() string {
49 if p.IsBranchPage() {
50 return "branch"
51 } else if p.IsLeafPage() {
52 return "leaf"
53 } else if p.IsMetaPage() {
54 return "meta"
55 } else if p.IsFreelistPage() {
56 return "freelist"
57 }
58 return fmt.Sprintf("unknown<%02x>", p.flags)
59}
60
61func (p *Page) IsBranchPage() bool {
62 return p.flags == BranchPageFlag

Callers 10

StringMethod · 0.95
verifyPageReachableFunction · 0.80
PageMethod · 0.80
ClearPageElementsFunction · 0.80
traverseMethod · 0.80
FindPathsToKeyMethod · 0.80
ReadMethod · 0.80
TestPage_typFunction · 0.80
pageItemLeafPageElementFunction · 0.80
printPageFunction · 0.80

Calls 4

IsBranchPageMethod · 0.95
IsLeafPageMethod · 0.95
IsMetaPageMethod · 0.95
IsFreelistPageMethod · 0.95

Tested by 1

TestPage_typFunction · 0.64