Beetle.check_rate_inc
You're seeing just the function
check_rate_inc
, go back to Beetle module for more information.
Specs
check_rate_inc( id :: String.t(), scale_ms :: integer(), limit :: integer(), increment :: integer() ) :: {:allow, count :: integer()} | {:deny, limit :: integer()} | {:error, reason :: any()}
Same as check_rate/3, but allows the increment number to be specified. This is useful for limiting apis which have some idea of 'cost', where the cost of each hit can be specified.
Specs
check_rate_inc( backend :: atom(), id :: String.t(), scale_ms :: integer(), limit :: integer(), increment :: integer() ) :: {:allow, count :: integer()} | {:deny, limit :: integer()} | {:error, reason :: any()}
Same as check_rate_inc/4, but allows specifying a backend.