MCPcopy Index your code
hub / github.com/dagger/dagger / initializeWorkspace

Function initializeWorkspace

cmd/dagger/module_inspect.go:40–51  ·  view source on GitHub ↗

initializeWorkspace loads type definitions from the workspace. Modules are already served by the engine at connect time. The CLI consumes workspace entrypoint methods and module constructors directly from the engine schema's Query root.

(ctx context.Context, dag *dagger.Client, opts ...loadTypeDefsOpts)

Source from the content-addressed store, hash-verified

38// The CLI consumes workspace entrypoint methods and module constructors
39// directly from the engine schema's Query root.
40func initializeWorkspace(ctx context.Context, dag *dagger.Client, opts ...loadTypeDefsOpts) (rdef *moduleDef, rerr error) {
41 ctx, span := Tracer().Start(ctx, "load workspace: .")
42 defer telemetry.EndWithCause(span, &rerr)
43
44 def := &moduleDef{}
45
46 if err := def.loadTypeDefs(ctx, dag, opts...); err != nil {
47 return nil, err
48 }
49
50 return def, nil
51}
52
53// initializeModule loads the module at the given source ref
54//

Callers 3

call.goFile · 0.85
executeMethod · 0.85
mcpStartFunction · 0.85

Calls 3

loadTypeDefsMethod · 0.95
TracerFunction · 0.70
StartMethod · 0.65

Tested by

no test coverage detected