MCPcopy Create free account
hub / github.com/brimdata/super / Path

Method Path

db/commits/store.go:229–242  ·  view source on GitHub ↗

Path return the entire path from the commit object to the root in leaf to root order.

(ctx context.Context, leaf ksuid.KSUID)

Source from the content-addressed store, hash-verified

227// Path return the entire path from the commit object to the root
228// in leaf to root order.
229func (s *Store) Path(ctx context.Context, leaf ksuid.KSUID) ([]ksuid.KSUID, error) {
230 if leaf == ksuid.Nil {
231 return nil, errors.New("no path for nil commit ID")
232 }
233 if path, ok := s.paths.Get(leaf); ok {
234 return path, nil
235 }
236 path, err := s.PathRange(ctx, leaf, ksuid.Nil)
237 if err != nil {
238 return nil, err
239 }
240 s.paths.Add(leaf, path)
241 return path, nil
242}
243
244func (s *Store) PathRange(ctx context.Context, from, to ksuid.KSUID) ([]ksuid.KSUID, error) {
245 var path []ksuid.KSUID

Callers 8

PatchOfCommitMethod · 0.95
SetBaseMethod · 0.95
buildMergeObjectMethod · 0.45
CreatePoolFunction · 0.45
CreateBranchFunction · 0.45
OpenPoolFunction · 0.45
RemovePoolFunction · 0.45
vacateCommitsMethod · 0.45

Calls 4

PathRangeMethod · 0.95
NewMethod · 0.80
GetMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected