ETS-backed rate-limit state tracker.
Parses X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset headers
and stores the latest values per environment for observability.
Summary
Functions
Returns the most recently observed rate-limit state.
Initialises the ETS table. Called by GoCardlessClient.Application.
Updates rate-limit state from response headers.
Functions
@spec get(GoCardlessClient.Config.t()) :: map()
Returns the most recently observed rate-limit state.
@spec init() :: :ok
Initialises the ETS table. Called by GoCardlessClient.Application.
@spec update(GoCardlessClient.Config.t(), [{String.t(), String.t()}]) :: :ok
Updates rate-limit state from response headers.