Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SSLNone defines to run http server only SSLNone sslMode = iota // SSLStatic defines to run both https and http server. Redirect http to https SSLStatic // SSLAuto defines to run both https and http server. Redirect http to https. Https server with autocert support SSLAuto )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Http ¶
type Http struct {
Matcher
Address string
AssetsLocation string
AssetsWebRoot string
AssetsCacheDuration time.Duration
MaxBodySize int64
GzEnabled bool
ProxyHeaders []string
SSLConfig SSLConfig
Version string
AccessLog io.Writer
StdOutEnabled bool
Signature bool
Timeouts Timeouts
Metrics Metrics
}
Http is a proxy server for both http and https
type Matcher ¶
type Matcher interface {
Match(srv, src string) (string, discovery.MatchType, bool)
Servers() (servers []string)
Mappers() (mappers []discovery.URLMapper)
}
Matcher source info (server and route) to the destination url If no match found return ok=false
type SSLConfig ¶
type SSLConfig struct {
SSLMode sslMode
Cert string
Key string
ACMELocation string
ACMEEmail string
FQDNs []string
RedirHTTPPort int
}
SSLConfig holds all ssl params for rest server
type Timeouts ¶ added in v0.2.0
type Timeouts struct {
// server timeouts
ReadHeader time.Duration
Write time.Duration
Idle time.Duration
// transport timeouts
Dial time.Duration
KeepAlive time.Duration
IdleConn time.Duration
TLSHandshake time.Duration
ExpectContinue time.Duration
ResponseHeader time.Duration
}
Timeouts consolidate timeouts for both server and transport
Click to show internal directories.
Click to hide internal directories.