cache

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(dur int, excludedPaths []string) func(http.Handler) http.Handler

Handler caches all interactions with the API based on Method, URI, and status code.

Types

type ResponseWriterTee

type ResponseWriterTee struct {
	Buffer     bytes.Buffer
	StatusCode int
	// contains filtered or unexported fields
}

ResponseWriterTee captures input to an http.ResponseWriter

func (*ResponseWriterTee) Header

func (w *ResponseWriterTee) Header() http.Header

Header proxies http.ResponseWriter Header

func (*ResponseWriterTee) Write

func (w *ResponseWriterTee) Write(b []byte) (int, error)

Write proxies http.ResponseWriter Write

func (*ResponseWriterTee) WriteHeader

func (w *ResponseWriterTee) WriteHeader(statusCode int)

WriteHeader proxies http.ResponseWriter WriteHeader

Jump to

Keyboard shortcuts

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