Runtime Flow
Flow (Horse → Nidus)
- Horse receives the request.
- The
Nidus_Horse(...)middleware creates anIRouteRequestand callsGetNidus.LoadRouteModule(PathInfo, Request). - Nidus selects the route (
TRouteParse.SelectRoute) and creates/resolves the target module (with optional cache). - Horse executes the handler registered for the route (e.g.,
THorse.Get('/ping', ...)). - In
finally, the middleware callsGetNidus.DisposeRouteModule(PathInfo).
Lifecycle
- Without module cache: module instance is created/disposed per request.
- With module cache: selected modules can be reused (see
UseCache).
tip
Nidus does not register HTTP endpoints by itself: it prepares route-scoped DI/lifecycle. Endpoint handlers are registered in Horse.