httphandler

package
v0.1.76 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 6

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 added in v0.0.65

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 added in v0.0.65

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