Documentation
¶
Overview ¶
Package runtime is the fx composition root for the notifycat server. It reproduces the legacy internal/app.Wire graph as a single fx.Module: every helper that Wire used to call is a provider here, the startup validation gate is an fx.Invoke that fails App.Start on any failing mapping, and the HTTP server plus the cleanup/digest schedulers are driven by fx.Lifecycle hooks.
The module derives everything from a single config.Config the caller supplies (main does fx.Supply(cfg)); it never calls config.Load itself. As the composition root it is exempt from the inward-only layering rule and may import config, persistence, slack, github, and every domain's application and infrastructure packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module("runtime", fx.Provide( newLogger, newHTTPClient, buildSlackClient, newComposer, openAndMigrate, persistence.NewPullRequests, persistence.NewCodeReviews, buildProvider, buildRouter, buildDispatcher, buildStartReviewSink, buildCleanupScheduler, buildDigestScheduler, buildMux, buildServer, newRunContext, ), fx.Invoke(startupGate), fx.Invoke(registerServer), fx.Invoke(registerSchedulers), )
Module is the runtime composition root. Supply a config.Config and it builds the whole graph — logger, mappings provider, migrated database, Slack client, per-PR router, dispatcher, start-review sink, HTTP server, and the cleanup and digest schedulers — then starts the startup-validation gate, the HTTP server, and the schedulers via lifecycle hooks. A failing startup gate or a bad cron spec fails App.Start; the database handle closes on App.Stop.
Functions ¶
This section is empty.
Types ¶
This section is empty.