Documentation ¶
Index ¶
Constants ¶
View Source
const ( // No encoding applied EncodeNone = "" // Compress the data using the DEFLATE algorithm // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding#deflate EncodeDeflate = "deflate" // Compress the data using the LZW algorithm // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding#compress EncodeCompress = "compress" // Compress the data using the GZIP algorithm // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding#gzip EncodeGzip = "gzip" // Compress the data using the Brotli algorithm // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding#br EncodeBrotli = "br" // Compress the data using the Zstandard algorithm // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding#zstd EncodeZstd = "zstd" )
View Source
const (
// NonceMax is the maximum value of the `id` field in SSE before it resets to 0.
NonceMax = 1<<63 - 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
Writer is the interface for writing Server-Sent Events.
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter, opts Options) Writer
NewResponseWriter creates a new Writer for Server-Sent Events.
Click to show internal directories.
Click to hide internal directories.