httphandler

package
v0.0.0-...-fd14076 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0, Apache-2.0, BSD-2-Clause, + 1 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpHandler

type HttpHandler struct {
	RequestHandlers  func(http.Request)
	ResponseHandlers func(http.Response)
	MonitorHandlers  func(*MonitorMetric)
}

func NewHttpHandler

func NewHttpHandler() *HttpHandler

func (*HttpHandler) AddMonitorHandler

func (handler *HttpHandler) AddMonitorHandler(monitorHandler func(*MonitorMetric)) *HttpHandler

func (*HttpHandler) AddRequestHandler

func (handler *HttpHandler) AddRequestHandler(requestHandler func(http.Request)) *HttpHandler

func (*HttpHandler) AddResponseHandler

func (handler *HttpHandler) AddResponseHandler(responseHandler func(response http.Response)) *HttpHandler

type MonitorMetric

type MonitorMetric struct {
	Host          string
	Path          string
	Method        string
	Raw           string
	UserAgent     string
	RequestId     string
	StatusCode    int
	ContentLength int64
	Latency       time.Duration
}

Jump to

Keyboard shortcuts

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