servemux

package
v0.0.0-...-706ea71 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReverseProxyServeMux

func NewReverseProxyServeMux() *http.ServeMux

func SingleJoiningSlash

func SingleJoiningSlash(a, b string) string

Types

type ReverseProxyHandler

type ReverseProxyHandler struct {
	HTTPReverseProxy      http.Handler
	WebSocketReverseProxy http.Handler
}

func (*ReverseProxyHandler) NewReverseProxy

func (h *ReverseProxyHandler) NewReverseProxy(target string)

func (*ReverseProxyHandler) ServeHTTP

func (h *ReverseProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WsReverseProxy

type WsReverseProxy struct {
	//  Dialer contains options for connecting to the backend WebSocket server.
	//  If nil, DefaultDialer net..Dial is used.
	Dialer func(network, addr string) (net.Conn, error)

	// Director must be a function which modifies
	// the request into a new request to be sent
	// using Transport.
	Director func(*http.Request)

	// TLSClientConfig specifies the TLS configuration to use with
	// tls.Client.
	TLSClientConfig *tls.Config
}

func NewSingleHostWsReverseProxy

func NewSingleHostWsReverseProxy(target *url.URL) *WsReverseProxy

func (*WsReverseProxy) ServeHTTP

func (ws *WsReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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