Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rate limiting etc #1

Open
gedw99 opened this issue Mar 6, 2024 · 3 comments
Open

rate limiting etc #1

gedw99 opened this issue Mar 6, 2024 · 3 comments

Comments

@gedw99
Copy link

gedw99 commented Mar 6, 2024

Hey

Really clean package.

Would you be open to PR's that add rate limiting and other gateway patterns ?

@dkotik
Copy link
Owner

dkotik commented Mar 6, 2024

Yes! Right now everything is dumped into the same Go module, but I intend to add go.mod to either middleware folder or individual middlewares in order to reduce core dependencies to standard library only.

Regarding rate limiting:

  1. Seth Vargo's https://github.com/sethvargo/go-limiter will work with htadaptor no problem, because they are just vanilla http.HandlerFuncs.
  2. doodled some improvements on Seth's approach here: https://github.com/dkotik/oakratelimiter (work in progress)

Your ideas and contributions would be welcome - eager to cooperate.

@gedw99
Copy link
Author

gedw99 commented Mar 6, 2024

cool.

There are some nice ones here: https://github.com/zeromicro/go-zero/tree/master/core

all have zero dependencies, just like htadaptor.

SO maybe we can draw inspiration from these.

Have a look and see what you think...

@dkotik
Copy link
Owner

dkotik commented May 1, 2024

An interesting throttling library that could be shimmed in: https://github.com/1pkg/gohalt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants