Documentation ¶
Index ¶
- func AuthMiddleware(tokenAuth *jwtauth.JWTAuth, isProtected func(*http.Request) bool) func(next http.Handler) http.Handler
- func NewCapturedResponseWriter(w http.ResponseWriter) *capturedResponseWriter
- func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy
- func ProxyFallback(upstreamHost string, forwardToProxy func(int) bool, ...) func(next http.Handler) http.Handler
- func RequireUserAgent(next http.Handler) http.Handler
- func StatisticsMiddleware(stats *Statistics) func(next http.Handler) http.Handler
- type Statistics
- type UserAgentNotSetResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func NewCapturedResponseWriter ¶
func NewCapturedResponseWriter(w http.ResponseWriter) *capturedResponseWriter
func NewSingleHostReverseProxy ¶
func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy
func ProxyFallback ¶
func StatisticsMiddleware ¶
func StatisticsMiddleware(stats *Statistics) func(next http.Handler) http.Handler
Types ¶
type Statistics ¶
type Statistics struct { ActiveConnections int TotalConnections int TotalResponseTime time.Duration ConnectionsPerEndpoint map[string]int ResponseTimePerEndpoint map[string]time.Duration Mutex sync.Mutex }
func NewStatistics ¶
func NewStatistics() *Statistics
type UserAgentNotSetResponse ¶
Click to show internal directories.
Click to hide internal directories.