INNER CODE UNIT · Go

run

LerianStudio/midaz · components/tracer/cmd/app/main.go:47

func run() error {
	pkg.InitLocalEnvConfig()

	// Root ctx is signal-aware so SIGINT/SIGTERM during bootstrap (migration,
	// DB connect, cache warmup) cancel startup immediately instead of hanging
	// until internal timeouts.
	ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
	defer stop()

	service, err := bootstrap.InitServers(ctx)
	if err != nil {
		return fmt.Errorf("failed to initialize servers: %w", err)
	}

	service.Run()

	return nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…