pomerium/internal/tripper/roundtripper.go
Travis Groth d303a95985 Add proxy client metrics instrumentation
* New set of client request oriented metrics
* RoundTripper chain to instrument requests
2019-06-21 18:55:02 -04:00

13 lines
427 B
Go

package tripper // import "github.com/pomerium/pomerium/internal/tripper"
import (
"net/http"
)
// RoundTripperFunc wraps a function in a RoundTripper interface similar to HandlerFunc
type RoundTripperFunc func(*http.Request) (*http.Response, error)
// RoundTrip calls the underlying tripper function in the RoundTripperFunc
func (f RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) {
return f(req)
}