proxyhandler

package
v0.0.0-...-bae14f2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 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 ProxyHandler

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

ProxyHandler is flexible proxy handler

func New

func New(resolver Resolver, transport *transport.Transport) *ProxyHandler

New creates new ProxyHandler

func (*ProxyHandler) Handle

func (h *ProxyHandler) Handle(res http.ResponseWriter, request *http.Request)

Handle process request url

func (*ProxyHandler) HandleError

func (h *ProxyHandler) HandleError(res http.ResponseWriter, err error)

HandleError writes error response

type Resolver

type Resolver interface {
	Resolve(request *http.Request) (string, error)
}

Resolver interface

Jump to

Keyboard shortcuts

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