- 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.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
namespace StellaOps.Router.Common.Models;
|
|
|
|
/// <summary>
|
|
/// Describes an endpoint's identity and metadata.
|
|
/// </summary>
|
|
public sealed record EndpointDescriptor
|
|
{
|
|
/// <summary>
|
|
/// Gets the name of the service that owns this endpoint.
|
|
/// </summary>
|
|
public required string ServiceName { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the semantic version of the service.
|
|
/// </summary>
|
|
public required string Version { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the HTTP method (GET, POST, PUT, PATCH, DELETE).
|
|
/// </summary>
|
|
public required string Method { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the path template (e.g., "/billing/invoices/{id}").
|
|
/// </summary>
|
|
public required string Path { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the default timeout for this endpoint.
|
|
/// </summary>
|
|
public TimeSpan DefaultTimeout { get; init; } = TimeSpan.FromSeconds(30);
|
|
|
|
/// <summary>
|
|
/// Gets the claim requirements for authorization.
|
|
/// </summary>
|
|
public IReadOnlyList<ClaimRequirement> RequiringClaims { get; init; } = [];
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether this endpoint supports streaming.
|
|
/// </summary>
|
|
public bool SupportsStreaming { get; init; }
|
|
}
|