SSEBufferPolicy

sealed interface SSEBufferPolicy(source)

Policy that controls how an SSE diagnostic buffer is captured while reading a stream.

The buffer represents already processed data (no re-reading from the network). It is intended for logging and error analysis when failures happen.

Inheritors

Types

Link copied to clipboard
data object All : SSEBufferPolicy

Keep everything that has been processed so far.

Link copied to clipboard

Keep only the last completed event. Shorthand for LastEvents(1).

Link copied to clipboard
data class LastEvents(val count: Int) : SSEBufferPolicy

Keep the last count completed SSE events in the diagnostic buffer.

Link copied to clipboard
data class LastLines(val count: Int) : SSEBufferPolicy

Keep the last count text lines of the stream in the buffer. Includes blank lines that delimit SSE events, comment lines, etc.).

Link copied to clipboard
data object Off : SSEBufferPolicy

Disable buffer capture.