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.
Click to show internal directories.
Click to hide internal directories.