# README
Rate limiter

Simple rate limiting middleware for Gin. You can set rates per endpoint or on the global router.
Install
go get -u github.com/WorkTimeAssistant/gin-limit
Usage
Limit global or endpoint's router.
package main
import (
gl github.com/WorkTimeAssistant/gin-limit
"github.com/gin-gonic/gin"
)
func main() {
router := gin.Default()
router.Use(gl.Limit(1000 /* max requests per second */, 20 /* max burst size*/))
router.GET("/test", gl.Limit(100, 10), /* handler */)
router.Run()
}
# Functions
Drops (HTTP status 429) the request if the limit is reached.
# Variables
No description provided by the author