proxy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 31 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 MultiWrite added in v0.6.0

func MultiWrite(read io.ReadCloser, number int) []io.ReadCloser

MultiWrite The ReadCloser object in the returned array needs to use multiple goroutines to read at the same time

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 replace 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