Implement InMemory Transport Layer for StellaOps Router
- Added InMemoryTransportOptions class for configuration settings including timeouts and latency. - Developed InMemoryTransportServer class to handle connections, frame processing, and event management. - Created ServiceCollectionExtensions for easy registration of InMemory transport services. - Established project structure and dependencies for InMemory transport library. - Implemented comprehensive unit tests for endpoint discovery, connection management, request/response flow, and streaming capabilities. - Ensured proper handling of cancellation, heartbeat, and hello frames within the transport layer.
This commit is contained in:
24
src/__Libraries/StellaOps.Router.Common/Models/Frame.cs
Normal file
24
src/__Libraries/StellaOps.Router.Common/Models/Frame.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using StellaOps.Router.Common.Enums;
|
||||
|
||||
namespace StellaOps.Router.Common.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a protocol frame in the router transport layer.
|
||||
/// </summary>
|
||||
public sealed record Frame
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the type of this frame.
|
||||
/// </summary>
|
||||
public required FrameType Type { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the correlation ID for request/response matching.
|
||||
/// </summary>
|
||||
public string? CorrelationId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the raw payload bytes.
|
||||
/// </summary>
|
||||
public ReadOnlyMemory<byte> Payload { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user