web

package
v0.0.0-...-d5669e0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLimitsMiddleware

func NewLimitsMiddleware(maxReqDuration time.Duration, maxReqBodySizeBytes int64, maxReqsPerSecond int, next http.Handler) http.Handler

func NewPanicRecoverMiddleware

func NewPanicRecoverMiddleware(onPanic func(interface{}, *http.Request), next http.Handler) http.Handler

func NewRequestCountingMiddleware

func NewRequestCountingMiddleware(requestGauge *sync.WaitGroup, next http.Handler) http.Handler

Types

type LimitsMiddleware

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

func (*LimitsMiddleware) ServeHTTP

func (m *LimitsMiddleware) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Router

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

func NewRouter

func NewRouter() *Router

func (*Router) Handle

func (r *Router) Handle(pathPattern string, handler http.Handler) *mux.Route

func (*Router) HandleFunc

func (r *Router) HandleFunc(pathPattern string, handler func(w http.ResponseWriter, req *http.Request)) *mux.Route

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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