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)
| 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. |
| 320 | func (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. |
no test coverage detected