type TB … // NewHTTPProxyHandler returns a new HTTPProxyHandler. It accepts an optional // hook which is called early in the handler to export request state. If the // hook returns false, the handler returns immediately with a server error. func NewHTTPProxyHandler(t TB, hook func(req *http.Request) bool) *HTTPProxyHandler { … } type HTTPProxyHandler … // ServeHTTP handles an HTTP proxy request. func (h *HTTPProxyHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { … } func (h *HTTPProxyHandler) Wait() { … }