proxy

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

type Forwarder interface {
	Forward(w http.ResponseWriter, r *http.Request, c Transformer)
}

type Proxy

type Proxy struct {
	FlushInterval time.Duration
	Logger        *log.Logger
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(target Targeter) *Proxy

func (*Proxy) Forward

func (p *Proxy) Forward(w http.ResponseWriter, r *http.Request, n Transformer)

func (*Proxy) Target

func (p *Proxy) Target() *url.URL

type RingTarget

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

func NewRingTarget

func NewRingTarget(baseURL []*url.URL) *RingTarget

func (*RingTarget) Target

func (t *RingTarget) Target() *url.URL

type Target

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

func NewTarget

func NewTarget(baseURL *url.URL) *Target

func (*Target) Target

func (t *Target) Target() *url.URL

type Targeter

type Targeter interface {
	Target() *url.URL
}

type Transformer

type Transformer interface {
	http.RoundTripper
	Director(t Targeter) func(*http.Request)
	ModifyResponse(*http.Response) error
}

Jump to

Keyboard shortcuts

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