SafeBoda/throttlex

Implement throttle function

Opened this issue · 0 comments

cabol commented
  1. 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}
  1. Implement it.

  2. Add tests.

Fee free to give your proposal and discuss it with the team.