Skip to content

jonsen/gin-ratelimit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

gin-ratelimit

gin-ratelimit, a ratelimit middleware for gin.

example:

package main

import (
	"github.com/gin-gonic/gin"
	ratelimit "github.com/jonsen/gin-ratelimit"
)

func main() {
	r := gin.New()

	r.Use(ratelimit.RateLimit(20))

	r.GET("/", func(c *gin.Context) {
		c.String(200, "Hello, world!")
	})

	r.Run(":12345")
}

About

gin-ratelimit, a ratelimit middleware for gin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages