accesslog

package
v0.0.0-...-0c66be6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PreliminaryLogTimeout = 10 * time.Second

Functions

func New

func New(handler http.Handler) http.Handler

func NewWithLogger

func NewWithLogger(handler http.Handler, logger *slog.Logger) http.Handler

Types

type AccessLogMiddleware

type AccessLogMiddleware struct {
	// contains filtered or unexported fields
}

func (*AccessLogMiddleware) ServeHTTP

func (this *AccessLogMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Response

type Response struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(w http.ResponseWriter) *Response

func (*Response) Header

func (this *Response) Header() http.Header

func (*Response) Write

func (this *Response) Write(bytes []byte) (int, error)

func (*Response) WriteHeader

func (this *Response) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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