MySQL 8.0.39
Source Code Documentation
BlockedEndpoints Class Reference

#include <blocked_endpoints.h>

Public Member Functions

 BlockedEndpoints (uint64_t max_connect_errors)
 
uint64_t max_connect_errors () const
 
uint64_t increment_error_count (const net::ip::tcp::endpoint &endpoint)
 increments the error count of an endpoint. More...
 
uint64_t reset_error_count (const net::ip::tcp::endpoint &endpoint)
 resets error counter for an endpoint. More...
 
bool is_blocked (const net::ip::tcp::endpoint &endpoint) const
 
uint64_t error_count (const net::ip::tcp::endpoint &endpoint) const
 
std::vector< std::string > get_blocked_client_hosts () const
 Returns list of blocked client hosts. More...
 

Private Attributes

std::mutex mutex_conn_errors_
 
const uint64_t max_connect_errors_
 Max connect errors blocking hosts when handshake not completed. More...
 
std::map< net::ip::address_v4, uint64_t > conn_error_counters_v4_
 Connection error counters for IPv4 hosts. More...
 
std::map< net::ip::address_v6, uint64_t > conn_error_counters_v6_
 Connection error counters for IPv4 hosts. More...
 

Constructor & Destructor Documentation

◆ BlockedEndpoints()

BlockedEndpoints::BlockedEndpoints ( uint64_t  max_connect_errors)
inline

Member Function Documentation

◆ error_count()

uint64_t BlockedEndpoints::error_count ( const net::ip::tcp::endpoint endpoint) const

◆ get_blocked_client_hosts()

std::vector< std::string > BlockedEndpoints::get_blocked_client_hosts ( ) const

Returns list of blocked client hosts.

◆ increment_error_count()

uint64_t BlockedEndpoints::increment_error_count ( const net::ip::tcp::endpoint endpoint)

increments the error count of an endpoint.

Parameters
endpointendpoint increment error counter for.
Returns
new error count value.

◆ is_blocked()

bool BlockedEndpoints::is_blocked ( const net::ip::tcp::endpoint endpoint) const

◆ max_connect_errors()

uint64_t BlockedEndpoints::max_connect_errors ( ) const
inline

◆ reset_error_count()

uint64_t BlockedEndpoints::reset_error_count ( const net::ip::tcp::endpoint endpoint)

resets error counter for an endpoint.

See also
increment_error_counter()
Parameters
endpointendpoint
Returns
previous value.

Member Data Documentation

◆ conn_error_counters_v4_

std::map<net::ip::address_v4, uint64_t> BlockedEndpoints::conn_error_counters_v4_
private

Connection error counters for IPv4 hosts.

◆ conn_error_counters_v6_

std::map<net::ip::address_v6, uint64_t> BlockedEndpoints::conn_error_counters_v6_
private

Connection error counters for IPv4 hosts.

◆ max_connect_errors_

const uint64_t BlockedEndpoints::max_connect_errors_
private

Max connect errors blocking hosts when handshake not completed.

◆ mutex_conn_errors_

std::mutex BlockedEndpoints::mutex_conn_errors_
mutableprivate

The documentation for this class was generated from the following files: