Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IsHealthy ¶
type IsHealthy func() bool
IsHealthy is func for fetching healthy status of remote server
type LocalProxy ¶
type LocalProxy struct {
// contains filtered or unexported fields
}
LocalProxy is responsible for handling requests when remote servers are unhealthy
func NewLocalProxy ¶
func NewLocalProxy(cacheMgr manager.CacheManager, isHealthy IsHealthy) *LocalProxy
NewLocalProxy creates a *LocalProxy
func (*LocalProxy) ServeHTTP ¶
func (lp *LocalProxy) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler for LocalProxy
Click to show internal directories.
Click to hide internal directories.