Implement throttle function
Opened this issue · 0 comments
cabol commented
- Define the callback. For example (initial proposal):
@callback with_throttling(
Throttlex.Bucket.Counter.counter(),
max_rate :: pos_integer | [pos_integer],
fun
) ::
{:ok, term} | {:error, :max_rate_exceeded}
-
Implement it.
-
Add tests.
Fee free to give your proposal and discuss it with the team.