28 lines
1.9 KiB
Markdown
28 lines
1.9 KiB
Markdown
# 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 registration
|
|
- `StellaEndpointGenerator` (`src/Router/__Libraries/StellaOps.Microservice.SourceGen/StellaEndpointGenerator.cs`) - Roslyn source generator for AOT-compatible endpoint registration
|
|
- `StellaEndpointAttribute` (`src/Router/__Libraries/StellaOps.Microservice/StellaEndpointAttribute.cs`) - attribute for marking router-discoverable endpoints
|
|
- `RouterConnectionManager` (`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 verify `EndpointDiscoveryService` discovers 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 `RouterConnectionManager` establishes HELLO handshake and sends periodic HEARTBEAT
|