Skip to main content

reload_event_frame

Function reload_event_frame 

Source
pub fn reload_event_frame(change_type: &ChangeType) -> Bytes
Expand description

Encode a reload event as an SSE (Server-Sent Events) frame.

The frame follows the SSE text/event-stream format:

event: <change_type>
data: {"type": "<change_type>"}

This is the single canonical place the SSE frame format is defined. Callers that forward reload events over HTTP (e.g., mini-unified) call this function rather than re-implementing the byte-for-byte format.