ERL
Include fastly/erl.h to use this class.
Constructor
Methods
check_rate
View sourcetl::expected<bool, ERLError> fastly::erl::ERL::check_rate(std::string_view entry, std::uint32_t delta, RateWindow window, std::uint32_t limit, std::chrono::minutes ttl) constIncrement an entry in a rate counter and check if the client has exceeded some average number of requests per second (RPS) over the window. If the client is over the rps limit for the window, add to the penaltybox for ttl. Valid ttl span is 1m to 1h.
Parameters
- entry: std::string_view
- delta: std::uint32_t
- window: RateWindow
- limit: std::uint32_t
- ttl: std::chrono::minutes
Returns
tl::expected<bool, ERLError>