Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCompression ¶
HandleCompression wraps an HTTP response in a compression writer. Compress types is a sets.Set[string] of mime types like: "text/plain", "application/json", etc. Any matching ContentType handled by the compression handler will be compressed
Types ¶
type ResponseEncoder ¶
type ResponseEncoder interface {
Write([]byte) (int, error)
Header() http.Header
WriteHeader(int)
Close() error
}
ResponseEncoder defines the ResponseEncoder interface for encoding responses just-in-time
func NewEncoder ¶
func NewEncoder(w http.ResponseWriter, ep *profile.Profile) ResponseEncoder
NewEncoder returns a new ResponseEncoder
Click to show internal directories.
Click to hide internal directories.