proxy

package
v0.3.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyHeader

func CopyHeader(dst, src http.Header)

func NewDupReadCloser

func NewDupReadCloser(rc io.ReadCloser) (io.ReadCloser, io.ReadCloser)

NewDupReadCloser create an dupReadCloser object

func NewEdgeServerHandler

func NewEdgeServerHandler(config *config.LiteServerConfig, transportManager *transport.TransportManager,
	cacheManager *cache.CacheManager, transportChannel <-chan string) (http.Handler, error)

func WithRequestAccept

func WithRequestAccept(handler http.Handler) http.Handler

WithRequestAccept delete header Accept, use default application/json

Types

type EdgeReverseProxy

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

EdgeReverseProxy represents a real pair of http request and response

func NewEdgeReverseProxy

func NewEdgeReverseProxy(transport *transport.EdgeTransport, backendUrl string, backendPort int, cacheManager *cache.CacheManager) *EdgeReverseProxy

func (*EdgeReverseProxy) ServeHTTP

func (p *EdgeReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type EdgeServerHandler

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

EdgeServerHandler is the real handler for each request

func (*EdgeServerHandler) ServeHTTP

func (h *EdgeServerHandler) 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