< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Sse.SseClientSubscription
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Sse/ISseBroadcaster.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 38
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 01/12/2026 - 18:03:06 Line coverage: 0% (0/1) Total lines: 38 Tag: Kestrun/Kestrun@956332ccc921363590dccd99d5707fb20b50966b01/16/2026 - 03:52:31 Line coverage: 100% (1/1) Total lines: 38 Tag: Kestrun/Kestrun@0077556dd757d1b7434cf700cd5c7be05cea3514

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ClientId()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Sse/ISseBroadcaster.cs

#LineLine coverage
 1using System.Threading.Channels;
 2
 3namespace Kestrun.Sse;
 4
 5/// <summary>
 6/// Provides a broadcast-style Server-Sent Events (SSE) publisher.
 7/// </summary>
 8public interface ISseBroadcaster
 9{
 10    /// <summary>
 11    /// Gets the number of currently connected SSE clients.
 12    /// </summary>
 13    int ConnectedCount { get; }
 14
 15    /// <summary>
 16    /// Subscribes a client to broadcast SSE events.
 17    /// </summary>
 18    /// <param name="cancellationToken">Cancellation token used to disconnect the client.</param>
 19    /// <returns>A subscription containing the client ID and a channel reader for SSE payloads.</returns>
 20    SseClientSubscription Subscribe(CancellationToken cancellationToken);
 21
 22    /// <summary>
 23    /// Broadcasts an SSE event to all connected clients.
 24    /// </summary>
 25    /// <param name="eventName">The event name (optional).</param>
 26    /// <param name="data">The event payload.</param>
 27    /// <param name="id">Optional event ID.</param>
 28    /// <param name="retryMs">Optional client reconnect interval in milliseconds.</param>
 29    /// <param name="cancellationToken">Cancellation token.</param>
 30    ValueTask BroadcastAsync(string? eventName, string data, string? id = null, int? retryMs = null, CancellationToken c
 31}
 32
 33/// <summary>
 34/// Represents a connected SSE client subscription.
 35/// </summary>
 36/// <param name="ClientId">Unique client identifier.</param>
 37/// <param name="Reader">Channel reader producing formatted SSE payloads.</param>
 938public readonly record struct SseClientSubscription(string ClientId, ChannelReader<string> Reader);

Methods/Properties

get_ClientId()