1.9 KiB
1.9 KiB
ASP.NET Endpoint Discovery and Router Dispatch Bridge
Module
Router
Status
IMPLEMENTED
Description
SDK that bridges ASP.NET Core minimal API / controller endpoints to StellaRouter dispatch. Includes EndpointDiscoveryService, ASP.NET Core discovery provider (via reflection and source generation), authorization mapping, and DI extensions. Enables microservices to auto-register their endpoints with the StellaRouter without manual configuration.
Implementation Details
- Modules:
src/Router/__Libraries/StellaOps.Microservice/,src/Router/__Libraries/StellaOps.Microservice.SourceGen/ - Key Classes:
EndpointDiscoveryService(src/Router/__Libraries/StellaOps.Microservice/EndpointDiscoveryService.cs) - discovers ASP.NET Core endpoints for router registrationStellaEndpointGenerator(src/Router/__Libraries/StellaOps.Microservice.SourceGen/StellaEndpointGenerator.cs) - Roslyn source generator for AOT-compatible endpoint registrationStellaEndpointAttribute(src/Router/__Libraries/StellaOps.Microservice/StellaEndpointAttribute.cs) - attribute for marking router-discoverable endpointsRouterConnectionManager(src/Router/__Libraries/StellaOps.Microservice/RouterConnectionManager.cs) - manages HELLO/HEARTBEAT handshake with Gateway
- Interfaces:
IEndpointDiscoveryService,IRouterConnectionManager - Source: SPRINT_8100_0011_0001_router_sdk_aspnet_bridge.md
E2E Test Plan
- Annotate endpoints with
[StellaEndpoint]and verifyEndpointDiscoveryServicediscovers them - Verify auto-registration: start a microservice and confirm endpoints are registered with the Gateway
- Verify source-generated endpoint registration matches reflection-based discovery
- Verify authorization mapping: annotate endpoints with auth requirements and confirm they propagate to the router
- Verify
RouterConnectionManagerestablishes HELLO handshake and sends periodic HEARTBEAT