MCPcopy Create free account
hub / github.com/dagger/dagger / NewModTree

Function NewModTree

core/modtree.go:50–67  ·  view source on GitHub ↗
(ctx context.Context, mod dagql.ObjectResult[*Module])

Source from the content-addressed store, hash-verified

48}
49
50func NewModTree(ctx context.Context, mod dagql.ObjectResult[*Module]) (*ModTreeNode, error) {
51 main := mod.Self()
52 mainType, ok := main.mainObjectTypeDefResult()
53 if !ok {
54 return nil, fmt.Errorf("%q: no main object", main.Name())
55 }
56 srv, err := dagqlServerForModule(ctx, mod)
57 if err != nil {
58 return nil, err
59 }
60 return &ModTreeNode{
61 DagqlServer: srv,
62 Module: mod,
63 OriginalModule: mod,
64 Type: mainType,
65 Description: main.Description,
66 }, nil
67}
68
69func (node *ModTreeNode) Run(
70 ctx context.Context,

Callers 3

NewUpGroupFunction · 0.85
NewCheckGroupFunction · 0.85
NewGeneratorGroupFunction · 0.85

Calls 4

dagqlServerForModuleFunction · 0.85
SelfMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected