mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-03 20:36:03 +02:00
13 lines
427 B
Go
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)
|
|
}
|