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 ¶
HTTPProxy refers to a reverse proxy in the balancer
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.