Throttex.Core (throttex v0.1.0)
Summary
Types
Functions
@spec initial_state(rates :: [Throttex.Rate.t()]) :: t()
@spec release(t(), request_id :: term(), Throttex.Types.timestamp()) :: {:ok, t()} | :error
@spec request(state :: t(), rate_id :: term(), Throttex.Types.timestamp()) :: {:ok, request_id :: term(), new_state :: t()} | {:error, :invalid_rate | :unavailable}