Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyReaderHandler ¶
BodyReaderHandler reads body so it will appear in request log.
func NotifyHandler ¶
func NotifyHandler(notify NotifyFunc, next http.Handler) http.Handler
Types ¶
type NotifyFunc ¶
type Option ¶
type Option func(*options)
func WithListenerWrapper ¶ added in v1.26.0
WithListenerWrapper wraps the listener, e.g. to reject connections before the TLS handshake.
func WithNotifyStarted ¶ added in v1.26.0
func WithNotifyStarted(f func()) Option
WithNotifyStarted sets a function called once the server is listening.
func WithTLSConfig ¶ added in v1.26.0
WithTLSConfig makes the server accept TLS connections.
type Request ¶
type Request struct {
Method string `json:"method"`
Proto string `json:"proto"`
URL string `json:"url"`
Host string `json:"host"`
Headers http.Header `json:"headers"`
Body string `json:"body"`
}
Request represents HTTP request metadata for events.
Click to show internal directories.
Click to hide internal directories.