Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecoverOption ¶
type RecoverOption func(options *RecoverOptions)
func RecoverWithDisablePrintStack ¶
func RecoverWithDisablePrintStack(v bool) RecoverOption
RecoverWithDisablePrintStack roundTripware option
type RecoverOptions ¶
type RecoverOptions struct {
DisablePrintStack bool
}
func GetDefaultRecoverOptions ¶
func GetDefaultRecoverOptions() RecoverOptions
GetDefaultRecoverOptions returns the default options
type RoundTripper ¶
type RoundTripper struct { http.RoundTripper // contains filtered or unexported fields }
func NewRoundTripper ¶
func NewRoundTripper(l *zap.Logger, parent http.RoundTripper, roundTripwares ...RoundTripware) *RoundTripper
type RoundTripware ¶
func DumpRequest ¶
func DumpRequest() RoundTripware
DumpRequest returns a RoundTripper which prints out the request object
func DumpResponse ¶
func DumpResponse() RoundTripware
DumpResponse returns a RoundTripper which prints out the response object
func Recover ¶
func Recover(opts ...RecoverOption) RoundTripware
Recover returns a RoundTripper which catches any panics
func RecoverWithOptions ¶
func RecoverWithOptions(opts RecoverOptions) RoundTripware
RecoverWithOptions returns a RoundTripper which catches any panics
Click to show internal directories.
Click to hide internal directories.