Documentation ¶
Index ¶
- func ClientFactory(l logging.Logger, f client.HTTPClientFactory, df spew.DumperFactory) client.HTTPClientFactory
- func PlainClientFormater(req interface{}, resp interface{}, err error) []byte
- func PlainServerFormater(req interface{}, resp interface{}, err error) []byte
- type RunServerFunc
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFactory ¶
func ClientFactory(l logging.Logger, f client.HTTPClientFactory, df spew.DumperFactory) client.HTTPClientFactory
ClientFactory decorates the transport of the client generated by the received factory with a Transport
func PlainClientFormater ¶
PlainClientFormater is a function that dumps the inspected data (at the client level) using the httputil lib
func PlainServerFormater ¶
PlainServerFormater is a function that dumps the inspected data (at the router level) using the httputil lib
Types ¶
type RunServerFunc ¶
RunServerFunc is the interface expected by all the KrakenD http routers
func RunServer ¶
func RunServer(l logging.Logger, f RunServerFunc, df spew.DumperFactory) RunServerFunc
RunServer returns a wrapper over the received RunServerFunc so it can inject a decorated http.Handler and dump pairs of request and response using the generated dumper.
type Transport ¶
type Transport struct { Transport http.RoundTripper Logger logging.Logger Spew spew.Dumper Plain spew.Dumper }
Transport is a wrapper over an instance of http.RoundTripper. It dumps every pair of request and response into two dumpers: one using the spew lib; the second using the httputil package from the standard lib