MCPcopy Index your code
hub / github.com/perkeep/perkeep / startLoadNode

Method startLoadNode

cmd/pk-get/graph.go:113–127  ·  view source on GitHub ↗
(br blob.Ref)

Source from the content-addressed store, hash-verified

111}
112
113func (g *graph) startLoadNode(br blob.Ref) {
114 g.mu.Lock()
115 defer g.mu.Unlock()
116 key := br.String()
117 if _, ok := g.n[key]; ok {
118 return
119 }
120 n := &node{
121 g: g,
122 br: br,
123 }
124 g.n[key] = n
125 g.wg.Add(1)
126 go n.load()
127}
128
129func printGraph(src blob.Fetcher, root blob.Ref) {
130 g := &graph{

Callers 2

printGraphFunction · 0.95
addEdgeMethod · 0.80

Calls 5

loadMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80
StringMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected