1.7 KiB
1.7 KiB
Router YAML/JSON Configuration with Hot-Reload
Module
Router
Status
IMPLEMENTED
Description
Centralized router configuration supporting YAML and JSON formats with IOptionsMonitor integration and FileSystemWatcher-based hot-reload. Includes validation, change event notification, and per-service routing options.
Implementation Details
- Modules:
src/Router/__Libraries/StellaOps.Router.Config/ - Key Classes:
RouterConfig(src/Router/__Libraries/StellaOps.Router.Config/RouterConfig.cs) - root configuration model for router settingsRouterConfigProvider(src/Router/__Libraries/StellaOps.Router.Config/RouterConfigProvider.cs) - watches config files and provides hot-reload viaIOptionsMonitorRouterConfigOptions(src/Router/__Libraries/StellaOps.Router.Config/RouterConfigOptions.cs) - options for config file paths and reload behaviorGatewayOptions(src/Router/StellaOps.Gateway.WebService/Configuration/GatewayOptions.cs) - gateway-specific configuration optionsGatewayOptionsValidator(src/Router/StellaOps.Gateway.WebService/Configuration/GatewayOptionsValidator.cs) - validates gateway configuration
- Interfaces:
IRouterConfigProvider - Source: batch_52/file_07.md
E2E Test Plan
- Load router configuration from a YAML file and verify
RouterConfigis populated correctly - Load configuration from a JSON file and verify equivalent behavior
- Modify the config file at runtime and verify
RouterConfigProvidertriggers hot-reload - Verify change event notification: subscribe to config changes and confirm notification on reload
- Verify validation: provide invalid config values and confirm
GatewayOptionsValidatorrejects them