- 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.
27 lines
734 B
C#
27 lines
734 B
C#
using StellaOps.Router.Common.Models;
|
|
|
|
namespace StellaOps.Microservice;
|
|
|
|
/// <summary>
|
|
/// Manages connections to router gateways.
|
|
/// </summary>
|
|
public interface IRouterConnectionManager
|
|
{
|
|
/// <summary>
|
|
/// Gets the current connection states.
|
|
/// </summary>
|
|
IReadOnlyList<ConnectionState> Connections { get; }
|
|
|
|
/// <summary>
|
|
/// Starts the connection manager.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
Task StartAsync(CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Stops the connection manager.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
Task StopAsync(CancellationToken cancellationToken);
|
|
}
|