Documentation ¶
Index ¶
- func GetIP(r *http.Request) (string, error)
- func NewServer(handler http.Handler, addr string) *http.Server
- func PerClientRateLimiter(interval time.Duration) func(next func(w http.ResponseWriter, r *http.Request)) http.Handler
- func RealIPHandler(key string) func(next http.Handler) http.Handler
- func RequestIDHandler(fieldKey string) func(next http.Handler) http.Handler
- type Error
- type Handler
- type Message
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerClientRateLimiter ¶ added in v0.0.4
func PerClientRateLimiter(interval time.Duration) func(next func(w http.ResponseWriter, r *http.Request)) http.Handler
https://blog.logrocket.com/rate-limiting-go-application/#per-client-rate-limiting
func RealIPHandler ¶ added in v0.0.2
Types ¶
Click to show internal directories.
Click to hide internal directories.