Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( XRealIP = http.CanonicalHeaderKey("X-Real-Ip") XProxy = http.CanonicalHeaderKey("X-Proxy") XForwardedFor = http.CanonicalHeaderKey("X-Forwarded-For") )
View Source
var ConnectionTimeout = 3 * time.Second
ConnectionTimeout refers to connection timeout for health check
View Source
var (
ReverseProxy = "Balancer-Reverse-Proxy"
)
Functions ¶
func IsBackendAlive ¶
IsBackendAlive Attempt to establish a tcp connection to determine whether the site is alive
Types ¶
type HTTPProxy ¶
type HTTPProxy struct {
// contains filtered or unexported fields
}
func NewHTTPProxy ¶
NewHTTPProxy create new reverse proxy with url and balancer algorithm
func (*HTTPProxy) HealthCheck ¶
HealthCheck enable a health check goroutine for each agent
Click to show internal directories.
Click to hide internal directories.