handler

package
v2.0.0-beta2.0...-6ef21df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCompression

func HandleCompression(next http.Handler, compressTypes strutil.Lookup) http.Handler

HandleCompression wraps an HTTP response in a compression writer Compress types is a map[string]interface{} like: {"text/plain": nil, "application/json": nil} 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

NewEncoder returns a new ResponseEncoder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL