response

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CacheStatusHeader = "X-Go-Proxy-Cache-Status"

CacheStatusHeader - HTTP Header for showing cache status

View Source
const CacheStatusHeaderHit = "HIT"

CacheStatusHeaderHit - Cache status HIT for HTTP Header X-Go-Proxy-Cache-Status

View Source
const CacheStatusHeaderMiss = "MISS"

CacheStatusHeaderMiss - Cache status MISS for HTTP Header X-Go-Proxy-Cache-Status

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggedResponseWriter

type LoggedResponseWriter struct {
	http.ResponseWriter
	http.Hijacker
	StatusCode int
	Content    [][]byte
}

LoggedResponseWriter - Decorator for http.ResponseWriter

func NewLoggedResponseWriter

func NewLoggedResponseWriter(w http.ResponseWriter) *LoggedResponseWriter

NewLoggedResponseWriter - Creates new instance of ResponseWriter.

func (*LoggedResponseWriter) CopyHeaders

func (lwr *LoggedResponseWriter) CopyHeaders(src http.Header)

CopyHeaders - Adds the headers to the response.

func (*LoggedResponseWriter) Hijack added in v0.2.0

func (lwr *LoggedResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)

Hijack lets the caller take over the connection.

func (*LoggedResponseWriter) Reset

func (lwr *LoggedResponseWriter) Reset()

Reset - Reset the stored content of LoggedResponseWriter.

func (*LoggedResponseWriter) Write

func (lwr *LoggedResponseWriter) Write(p []byte) (int, error)

Write - ResponseWriter's Write method decorator.

func (*LoggedResponseWriter) WriteBody

func (lwr *LoggedResponseWriter) WriteBody(page string) bool

WriteBody - Sends the body to the client.

func (*LoggedResponseWriter) WriteHeader

func (lwr *LoggedResponseWriter) WriteHeader(statusCode int)

WriteHeader - ResponseWriter's WriteHeader method decorator.

Jump to

Keyboard shortcuts

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