proxy

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmartBuilder

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

SmartBuilder is a proxy builder which returns a fast proxy or httputil proxy corresponding to the ServersTransport configuration.

func NewSmartBuilder

func NewSmartBuilder(transportManager TransportManager, proxyBuilder service.ProxyBuilder, fastProxyConfig static.FastProxyConfig) *SmartBuilder

NewSmartBuilder creates and returns a new SmartBuilder instance.

func (*SmartBuilder) Build

func (b *SmartBuilder) Build(configName string, targetURL *url.URL, passHostHeader, preservePath bool, flushInterval time.Duration) (http.Handler, error)

Build builds an HTTP proxy for the given URL using the ServersTransport with the given name.

func (*SmartBuilder) Update

func (b *SmartBuilder) Update(newConfigs map[string]*dynamic.ServersTransport)

Update is the handler called when the dynamic configuration is updated.

type TransportManager

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

TransportManager manages transport used for backend communications.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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