move router context to run methods

This commit is contained in:
Joel Wetzell
2026-01-16 18:50:40 -06:00
parent a8f9894ff0
commit 0c777a8874
21 changed files with 220 additions and 186 deletions

View File

@@ -137,7 +137,7 @@ func run(ctx context.Context, c *cli.Command) error {
commandLogger := slog.Default().With("component", "cmd")
router, moduleErrors, routeErrors := showbridge.NewRouter(context.Background(), config)
router, moduleErrors, routeErrors := showbridge.NewRouter(config)
for _, moduleError := range moduleErrors {
commandLogger.Error("problem initializing module", "index", moduleError.Index, "error", moduleError.Error)
@@ -150,7 +150,7 @@ func run(ctx context.Context, c *cli.Command) error {
routerRunner := sync.WaitGroup{}
routerRunner.Go(func() {
router.Run()
router.Run(context.Background())
})
<-ctx.Done()