Versions in this module Expand all Collapse all v0 v0.1.3 Jul 8, 2026 Changes in this version + var ErrAlreadyStarted = errors.New("sse stream already started") + func AsSSE(handler func(*Stream) error) httpx.RespOption + func AsSSEEvent(events ...Event) httpx.RespOption + func AsSSEWithHeartbeat(heartbeat time.Duration, handler func(*Stream) error) httpx.RespOption + type Event struct + Data interface{} + Event string + ID string + Retry int + type Stream struct + func NewStream(ctx *gin.Context) *Stream + func (s *Stream) Close() error + func (s *Stream) Send(event Event) error + func (s *Stream) SendEvent(eventType string, data interface{}) error + func (s *Stream) SendJSON(data interface{}) error + func (s *Stream) Start() error + func (s *Stream) StartHeartbeat(interval time.Duration)