internal

package
v0.322.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddResponseBodyMonitorToContext

func AddResponseBodyMonitorToContext(ctx context.Context) context.Context

func AddResponseToMonitor

func AddResponseToMonitor(ctx context.Context, resp *http.Response)

func CheckForUnclosedResponses

func CheckForUnclosedResponses(ctx context.Context)

func InitFieldsFromRequest

func InitFieldsFromRequest(ctx context.Context, req *http.Request) context.Context

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

func NewRequestLogger(ctx context.Context, req *http.Request) (RequestLogger, context.Context)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL