MCPcopy Index your code
hub / github.com/rilldata/rill / runRuntime

Method runRuntime

cli/cmd/devtool/start.go:542–563  ·  view source on GitHub ↗
(ctx context.Context, verbose bool, preset string)

Source from the content-addressed store, hash-verified

540}
541
542func (s cloud) runRuntime(ctx context.Context, verbose bool, preset string) (err error) {
543 logInfo.Printf("Starting runtime\n")
544 defer logInfo.Printf("Stopped runtime\n")
545
546 cmd := newCmd(ctx, "go", "run", "cli/main.go", "runtime", "start")
547 cmd.Env = os.Environ()
548 if preset == "minimal" {
549 cmd.Env = append(
550 cmd.Env,
551 // Disable traces
552 "RILL_RUNTIME_TRACES_EXPORTER="+string(observability.NoopExporter),
553 // Change metrics to Prometheus, which unlike Otel doesn't require an external collector.
554 "RILL_RUNTIME_METRICS_EXPORTER="+string(observability.PrometheusExporter),
555 )
556 }
557 if verbose {
558 cmd.Env = append(cmd.Env, "RILL_RUNTIME_LOG_LEVEL=debug")
559 }
560 cmd.Stdout = os.Stdout
561 cmd.Stderr = os.Stdout
562 return cmd.Run()
563}
564
565func (s cloud) awaitRuntime(ctx context.Context) error {
566 pingURL := lookupDotenv("RILL_RUNTIME_AUTH_AUDIENCE_URL") // TODO: This is a proxy for the runtime's external URL. Should be less implicit.

Callers 1

startMethod · 0.95

Calls 3

newCmdFunction · 0.85
PrintfMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected