mirror

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mirroring

type Mirroring struct {
	// contains filtered or unexported fields
}

Mirroring is an http.Handler that can mirror requests.

func New

func New(handler http.Handler, pool *safe.Pool, maxBodySize int64) *Mirroring

New returns a new instance of *Mirroring.

func (*Mirroring) AddMirror

func (m *Mirroring) AddMirror(handler http.Handler, percent int) error

AddMirror adds an httpHandler to mirror to.

func (*Mirroring) ServeHTTP

func (m *Mirroring) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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