fast

package
v1.7.35 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyBuilder

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

ProxyBuilder handles the connection pools for the FastProxy proxies.

func NewProxyBuilder

func NewProxyBuilder(transportManager TransportManager, config static.FastProxyConfig) *ProxyBuilder

NewProxyBuilder creates a new ProxyBuilder.

func (*ProxyBuilder) Build

func (r *ProxyBuilder) Build(cfgName string, targetURL *url.URL, passHostHeader, preservePath bool) (http.Handler, error)

Build builds a new ReverseProxy with the given configuration.

func (*ProxyBuilder) Update

func (r *ProxyBuilder) Update(newConfigs map[string]*dynamic.ServersTransport)

Update updates all the round-tripper corresponding to the given configs. This method must not be used concurrently.

type ReverseProxy

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

ReverseProxy is the FastProxy reverse proxy implementation.

func NewReverseProxy

func NewReverseProxy(targetURL, proxyURL *url.URL, debug, passHostHeader, preservePath bool, connPool *connPool) (*ReverseProxy, error)

NewReverseProxy creates a new ReverseProxy.

func (*ReverseProxy) ServeHTTP

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

type TransportManager

type TransportManager interface {
	Get(name string) (*dynamic.ServersTransport, error)
	GetTLSConfig(name string) (*tls.Config, error)
}

TransportManager manages transport used for backend communications.

Jump to

Keyboard shortcuts

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