Files
git.stella-ops.org/docs/features/checked/router/router-common-models-and-abstractions-library.md
2026-02-14 09:11:48 +02:00

26 lines
1.5 KiB
Markdown

# Router Common Models and Abstractions Library
## Module
Router
## Status
IMPLEMENTED
## Description
Core shared library defining frame types (REQUEST, RESPONSE, HELLO, HEARTBEAT, CANCEL, STREAM_DATA), transport abstractions (ITransportServer, ITransportClient), routing contracts (IGlobalRoutingState, IRoutingPlugin, IRegionProvider), and model types (EndpointDescriptor, InstanceDescriptor, ConnectionState, RoutingContext, RoutingDecision, PayloadLimits).
## Implementation Details
- **Modules**: `src/Router/__Libraries/StellaOps.Router.Common/`
- **Key Classes**:
- `PathMatcher` (`src/Router/__Libraries/StellaOps.Router.Common/PathMatcher.cs`) - path matching with wildcard and parameterized segment support
- **Interfaces**: `ITransportServer`, `ITransportClient`, `IGlobalRoutingState`, `IRoutingPlugin`, `IRegionProvider` (all defined in Router.Common)
- **Models**: `EndpointDescriptor`, `InstanceDescriptor`, `ConnectionState`, `RoutingContext`, `RoutingDecision`, `PayloadLimits`, frame types (REQUEST, RESPONSE, HELLO, HEARTBEAT, CANCEL, STREAM_DATA)
- **Source**: batch_51/file_16.md
## E2E Test Plan
- [ ] Verify all frame types can be serialized and deserialized correctly
- [ ] Verify `PathMatcher` handles exact, wildcard, and parameterized path matching
- [ ] Verify `EndpointDescriptor` carries all required metadata (path, method, version, claims)
- [ ] Verify `RoutingContext` and `RoutingDecision` models are populated correctly during routing
- [ ] Verify `PayloadLimits` enforcement: send a payload exceeding limits and confirm rejection