Versions in this module Expand all Collapse all v0 v0.0.2 May 6, 2023 Changes in this version + var ConnectionTimeout = 3 * time.Second + var ReverseProxy = "Balancer-Reverse-Proxy" + var XForwardedFor = http.CanonicalHeaderKey("X-Forwarded-For") + var XProxy = http.CanonicalHeaderKey("X-Proxy") + var XRealIP = http.CanonicalHeaderKey("X-Real-Ip") + func GetHost(url *url.URL) string + func GetIP(r *http.Request) string + func IsBackendAlive(host string) bool + type HTTPProxy struct + func NewHTTPProxy(targetHosts []string, algorithm string) (*HTTPProxy, error) + func (h *HTTPProxy) HealthCheck(interval uint) + func (h *HTTPProxy) ReadAlive(url string) bool + func (h *HTTPProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (h *HTTPProxy) SetAlive(url string, alive bool)