- 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.
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
namespace StellaOps.Microservice;
|
|
|
|
/// <summary>
|
|
/// Abstraction for HTTP-style header collection.
|
|
/// </summary>
|
|
public interface IHeaderCollection : IEnumerable<KeyValuePair<string, string>>
|
|
{
|
|
/// <summary>
|
|
/// Gets a header value by key.
|
|
/// </summary>
|
|
/// <param name="key">The header key (case-insensitive).</param>
|
|
/// <returns>The header value, or null if not found.</returns>
|
|
string? this[string key] { get; }
|
|
|
|
/// <summary>
|
|
/// Gets all values for a header key.
|
|
/// </summary>
|
|
/// <param name="key">The header key (case-insensitive).</param>
|
|
/// <returns>All values for the key.</returns>
|
|
IEnumerable<string> GetValues(string key);
|
|
|
|
/// <summary>
|
|
/// Tries to get a header value.
|
|
/// </summary>
|
|
/// <param name="key">The header key.</param>
|
|
/// <param name="value">The header value if found.</param>
|
|
/// <returns>True if the header was found.</returns>
|
|
bool TryGetValue(string key, out string? value);
|
|
|
|
/// <summary>
|
|
/// Checks if a header exists.
|
|
/// </summary>
|
|
/// <param name="key">The header key.</param>
|
|
/// <returns>True if the header exists.</returns>
|
|
bool ContainsKey(string key);
|
|
}
|