sounds like the leaky bucket algorithm for rate limiting! you could probably use golang.org/x/time/rate’s Limiter to get this behavior instead and hand rolling it
writing a token bucket (no leaky) it's actually pretty simple
Please Login to reply.
No replies yet.