25namespace web::dosguard {
53 [[nodiscard]]
virtual bool
63 [[nodiscard]]
virtual bool
64 isOk(std::string
const& ip)
const noexcept = 0;
94 [[maybe_unused]]
virtual bool
95 add(std::string
const& ip, uint32_t numObjects)
noexcept = 0;
106 [[maybe_unused]]
virtual bool
The interface of a denial of service guard.
Definition DOSGuardInterface.hpp:30
virtual void clear() noexcept=0
Clears implementation-defined counters.
The interface of a denial of service guard.
Definition DOSGuardInterface.hpp:44
virtual bool isWhiteListed(std::string_view const ip) const noexcept=0
Check whether an ip address is in the whitelist or not.
virtual void decrement(std::string const &ip) noexcept=0
Decrement connection count for the given ip address.
virtual void increment(std::string const &ip) noexcept=0
Increment connection count for the given ip address.
virtual bool add(std::string const &ip, uint32_t numObjects) noexcept=0
Adds numObjects of usage for the given ip address.
virtual bool request(std::string const &ip) noexcept=0
Adds one request for the given ip address.
virtual bool isOk(std::string const &ip) const noexcept=0
Check whether an ip address is currently rate limited or not.