Documentation ¶
Index ¶
- Constants
- type Config
- type Director
- type DirectorChain
- type DirectorDestMap
- type DirectorHost
- type DirectorSameIP
- type DirectorSetHeaders
- type DirectorSetHeadersByIP
- type DirectorSetScheme
- type HTTPHeader
- type HTTPHeaders
- type HTTPProxy
- type IPHeaders
- type Net
- type RateLimitParams
- type RateLimiter
- type Transport
- type TransportLogger
Constants ¶
View Source
const ( ConnectionID = "{{CONNECTION_ID}}" HTTPProto = "{{HTTP_PROTO}}" SourceIP = "{{SOURCE_IP}}" SourcePort = "{{SOURCE_PORT}}" SourceIPPort = "{{SOURCE_IP}}:{{SOURCE_PORT}}" )
View Source
const ( ProtocolHTTP = "http" ProtocolHTTPS = "https" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.20.2
type DirectorChain ¶ added in v0.20.2
type DirectorChain []Director
func NewDirectorChain ¶ added in v0.20.2
func NewDirectorChain(directors ...Director) DirectorChain
skip nil directors
type DirectorDestMap ¶ added in v0.20.2
func NewDirectorDestMap ¶ added in v0.20.2
func NewDirectorDestMap(m map[string]string) DirectorDestMap
type DirectorHost ¶ added in v0.20.2
type DirectorHost string
func NewDirectorHost ¶ added in v0.20.2
func NewDirectorHost(host string) DirectorHost
type DirectorSameIP ¶ added in v0.20.2
type DirectorSameIP struct {
Port string
}
func NewDirectorSameIP ¶ added in v0.20.2
func NewDirectorSameIP(port int) DirectorSameIP
type DirectorSetHeaders ¶ added in v0.20.2
func NewDirectorSetHeaders ¶ added in v0.20.2
func NewDirectorSetHeaders(m map[string]string) DirectorSetHeaders
type DirectorSetHeadersByIP ¶ added in v0.29.1
type DirectorSetHeadersByIP struct { cidranger.Ranger[HTTPHeaders] // contains filtered or unexported fields }
func NewDirectorSetHeadersByIP ¶ added in v0.29.1
func NewDirectorSetHeadersByIP(m map[string]HTTPHeaders) (DirectorSetHeadersByIP, error)
type DirectorSetScheme ¶ added in v0.22.6
type DirectorSetScheme string
func NewSetSchemeDirector ¶ added in v0.22.6
func NewSetSchemeDirector(scheme string) DirectorSetScheme
type HTTPHeader ¶ added in v0.29.1
type HTTPHeaders ¶ added in v0.29.1
type HTTPHeaders []HTTPHeader
type HTTPProxy ¶
type HTTPProxy struct { GetContext func(req *http.Request) (context.Context, error) HandleHTTPValidation func(w http.ResponseWriter, r *http.Request) bool Director Director // modify requests to backend. HTTPTransport http.RoundTripper EnableAccessLog bool IdleTimeout time.Duration // contains filtered or unexported fields }
type RateLimitParams ¶ added in v0.29.0
type RateLimiter ¶ added in v0.29.0
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶ added in v0.29.0
func NewRateLimiter(params RateLimitParams) (*RateLimiter, error)
type Transport ¶ added in v0.22.6
type Transport struct { IgnoreHTTPSCertificate bool RateLimiter *RateLimiter }
type TransportLogger ¶ added in v0.23.16
type TransportLogger struct {
Transport http.RoundTripper
}
func NewTransportLogger ¶ added in v0.23.16
func NewTransportLogger(transport http.RoundTripper) TransportLogger
Click to show internal directories.
Click to hide internal directories.