proxy

package
v0.0.0-...-0d2855b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResponseWriter

func NewResponseWriter(rw http.ResponseWriter) http.ResponseWriter

func NewReverseProxy

func NewReverseProxy(target *url.URL, opts *configOptions.Options) (*httputil.ReverseProxy, error)

func NewWebSocketOrRestReverseProxy

func NewWebSocketOrRestReverseProxy(u *url.URL, opts *configOptions.Options) (restProxy http.Handler)

Types

type MetricsServer

type MetricsServer struct {
	Handler http.Handler
	Opts    *config.Options
}

func (*MetricsServer) ListenAndServe

func (s *MetricsServer) ListenAndServe()

type ProxyServer

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

func NewProxyServer

func NewProxyServer(opts *configOptions.Options) *ProxyServer

func (*ProxyServer) RegisterRequestHandlers

func (p *ProxyServer) RegisterRequestHandlers(reqHandlers []handlers.RequestHandler)

RegisterRequestHandlers adds request handlers to the

func (*ProxyServer) ServeHTTP

func (p *ProxyServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*ProxyServer) StructuredError

func (p *ProxyServer) StructuredError(rw http.ResponseWriter, err error)

type Server

type Server struct {
	Handler http.Handler
	Opts    *config.Options
}

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

type UpstreamProxy

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

func (*UpstreamProxy) ServeHTTP

func (u *UpstreamProxy) 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