blasphemy / glimit

A Go Rate Limiter backed by gorm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status Go Report Card

glimit

A Go Rate Limiter backed by gorm

caveats

  • It doesn't utilize a monotonic clock, so hopefully your system clock is relatively sane.
  • There's not much keeping you from "losing" a limiter and accumulating garbage, for example if you associated it with user sessions, you may want to do some housekeeping yourself.
  • I need to add an interface to use stores other than gorm
  • It does not supply a blocking function, as that could could cause problems. If you want one, I suggest you implement one yourself in your application with the required precision.
  • After a fair amount of testing I'm fairly comfortable with it's behavior in high load situations. However this may depend on your database.

docs

  • The comments and godoc should be enough to get you started

About

A Go Rate Limiter backed by gorm

License:MIT License


Languages

Language:Go 100.0%