Documentation ¶
Index ¶
- func AddResponseBodyMonitorToContext(ctx context.Context) context.Context
- func AddResponseToMonitor(ctx context.Context, resp *http.Response)
- func CheckForUnclosedResponses(ctx context.Context)
- func InitFieldsFromRequest(ctx context.Context, req *http.Request) context.Context
- func NewLoggingRoundTripper(ctx context.Context, base http.RoundTripper) http.RoundTripper
- type OpenResponseBodyErrors
- type RequestLogger
- type RequestTimer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitFieldsFromRequest ¶
func NewLoggingRoundTripper ¶
func NewLoggingRoundTripper(ctx context.Context, base http.RoundTripper) http.RoundTripper
Types ¶
type OpenResponseBodyErrors ¶
type OpenResponseBodyErrors struct {
// contains filtered or unexported fields
}
func (*OpenResponseBodyErrors) Error ¶
func (e *OpenResponseBodyErrors) Error() string
type RequestLogger ¶ added in v0.8.0
type RequestLogger interface { LogResponse(response *http.Response) // Calls Flush() automatically ResponseWriter(http.ResponseWriter) http.ResponseWriter FlushLog() // Must be called if using the ResponseWriter() func }
func NewRequestLogger ¶ added in v0.8.0
type RequestTimer ¶
type RequestTimer struct { RespWrapper middleware.WrapResponseWriter // contains filtered or unexported fields }
func NewRequestTimer ¶
func NewRequestTimer(w http.ResponseWriter, r *http.Request) RequestTimer
func (RequestTimer) Log ¶
func (r RequestTimer) Log(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.