package
2.2.2+incompatible
Repository: https://github.com/sunlidea/limiter.git
Documentation: pkg.go.dev
# Functions
DefaultErrorHandler is the default ErrorHandler used by a new Middleware.
DefaultLimitReachedHandler is the default LimitReachedHandler used by a new Middleware.
NewMiddleware return a new instance of a basic HTTP middleware.
WithErrorHandler will configure the Middleware to use the given ErrorHandler.
WithForwardHeader will configure the Middleware to trust X-Real-IP and X-Forwarded-For headers.
WithLimitReachedHandler will configure the Middleware to use the given LimitReachedHandler.
# Structs
Middleware is the middleware for basic http.Handler.
# Interfaces
Option is used to define Middleware configuration.
# Type aliases
ErrorHandler is an handler used to inform when an error has occurred.
LimitReachedHandler is an handler used to inform when the limit has exceeded.