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

Method RunUp

core/modtree.go:320–341  ·  view source on GitHub ↗

RunUp starts the service and returns a result that must be cleaned up. It does NOT block — the caller (UpGroup.Run) handles the blocking wait.

(ctx context.Context, include, exclude []string, portMappings []PortForward)

Source from the content-addressed store, hash-verified

318// RunUp starts the service and returns a result that must be cleaned up.
319// It does NOT block — the caller (UpGroup.Run) handles the blocking wait.
320func (node *ModTreeNode) RunUp(ctx context.Context, include, exclude []string, portMappings []PortForward) (*runUpStartResult, error) {
321 var result *runUpStartResult
322 err := node.Run(ctx,
323 func(n *ModTreeNode) bool { return n.IsUp },
324 func(ctx context.Context, n *ModTreeNode, clientMD *engine.ClientMetadata) (rerr error) {
325 ctx, span := Tracer(ctx).Start(ctx, n.PathString(),
326 telemetry.Reveal(),
327 trace.WithAttributes(
328 attribute.Bool(telemetry.UIRollUpLogsAttr, true),
329 attribute.String(ServiceNameAttr, n.PathString()),
330 ),
331 )
332 defer func() {
333 telemetry.EndWithCause(span, &rerr)
334 }()
335 var err error
336 result, err = n.runUpLocally(ctx, span, portMappings)
337 return err
338 },
339 include, exclude)
340 return result, err
341}
342
343// runUpStartResult is the result of starting a single service in runUpLocally.
344// It contains everything needed to display status and clean up after ctx cancellation.

Callers 2

RunMethod · 0.80
RunMethod · 0.80

Calls 7

RunMethod · 0.95
PathStringMethod · 0.80
runUpLocallyMethod · 0.80
TracerFunction · 0.70
StartMethod · 0.65
BoolMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected