Versions in this module Expand all Collapse all v0 v0.0.2 May 6, 2026 v0.0.1 Apr 29, 2026 Changes in this version + const CacheControlResponseHeaderKey + const CacheControlResponseHeaderValue + const ConnectionResponseHeaderKey + const ConnectionResponseHeaderValue + const ContentTypeResponseHeaderKey + const ContentTypeResponseHeaderValue + const LastEventIDRequestHeaderKey + var ErrInvalidField = errors.New("sse: field contains forbidden CR or LF") + type Message struct + type MessageOption func(*Message) + func WithBytesBuffer(buf *bytes.Buffer) MessageOption + func WithEvent(event string) MessageOption + func WithID(id string) MessageOption + func WithIntID(id int) MessageOption + func WithRetry(d time.Duration) MessageOption + type Response struct + func New(res http.ResponseWriter, req *http.Request, code int) (*Response, bool) + func (res *Response) Comment(text string) error + func (res *Response) LastEventID() (string, bool) + func (res *Response) Message(data []byte, opts ...MessageOption) error