< Summary - Kestrun — Combined Coverage

Information
Class: Public.Sse.Start-KrSseResponse
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Sse/Start-KrSseResponse.ps1
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 26
Line coverage: 0%
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/3) Total lines: 26 Tag: Kestrun/Kestrun@956332ccc921363590dccd99d5707fb20b50966b

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Sse/Start-KrSseResponse.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Starts a Server-Sent Events (SSE) response to the client.
 4    .DESCRIPTION
 5        This function initiates a Server-Sent Events (SSE) response to the connected client.
 6        It sets the appropriate headers and keeps the connection open for sending SSEs.
 7    .EXAMPLE
 8        Start-KrSseResponse
 9        Starts an SSE response to the client.
 10    .NOTES
 11        This function requires that SSE has been configured on the server using Add-KrSseMiddleware.
 12#>
 13function Start-KrSseResponse {
 14    [KestrunRuntimeApi('Route')]
 15    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
 16    [CmdletBinding()]
 17    param()
 18
 19    # Only works inside a route script block where $Context is available
 020    if ($null -ne $Context) {
 021        $Context.StartSse()
 22        return
 23    }
 24
 025    Write-KrOutsideRouteWarning
 26}

Methods/Properties

Start-KrSseResponse()