MySQL 8.0.39
Source Code Documentation
|
Namespaces | |
namespace | impl |
Enumerations | |
enum class | AccessMode { kUndefined = 0 , kReadWrite = 1 , kReadOnly = 2 } |
Modes supported by Routing plugin. More... | |
enum class | RoutingStrategy { kUndefined = 0 , kFirstAvailable = 1 , kNextAvailable = 2 , kRoundRobin = 3 , kRoundRobinWithFallback = 4 } |
Routing strategies supported by Routing plugin. More... | |
Functions | |
std::string ROUTING_EXPORT | get_access_mode_names () |
Get comma separated list of all access mode names. More... | |
AccessMode ROUTING_EXPORT | get_access_mode (const std::string &value) |
Returns AccessMode for its literal representation. More... | |
std::string ROUTING_EXPORT | get_access_mode_name (AccessMode access_mode) noexcept |
Returns literal name of given access mode. More... | |
std::string ROUTING_EXPORT | get_routing_strategy_names (bool metadata_cache) |
Get comma separated list of all routing stategy names for a given routing type (metadata cache or static) More... | |
RoutingStrategy ROUTING_EXPORT | get_routing_strategy (const std::string &value) |
Returns RoutingStrategy for its literal representation. More... | |
std::string ROUTING_EXPORT | get_routing_strategy_name (RoutingStrategy routing_strategy) noexcept |
Returns literal name of given routing strategy. More... | |
Variables | |
constexpr const int | kDefaultWaitTimeout {0} |
Timeout for idling clients (in seconds). More... | |
constexpr const int | kDefaultMaxConnections {0} |
Max number of active routes for this routing instance. More... | |
constexpr const std::chrono::seconds | kDefaultDestinationConnectionTimeout |
Timeout connecting to destination (in seconds). More... | |
constexpr const unsigned long long | kDefaultMaxConnectErrors {100} |
Maximum connect or handshake errors per host. More... | |
constexpr const std::string_view | kDefaultBindAddress {"127.0.0.1"} |
Default bind address. More... | |
constexpr const unsigned int | kDefaultNetBufferLength {16384} |
Default net buffer length. More... | |
constexpr const std::chrono::seconds | kDefaultClientConnectTimeout {9} |
Timeout waiting for handshake response from client. More... | |
constexpr const std::chrono::milliseconds | kDefaultConnectionSharingDelay {1000} |
delay in milliseconds before an idling connection may be moved to the pool when connection sharing is allowed. More... | |
constexpr const std::chrono::seconds | kDefaultUnreachableDestinationRefreshInterval {1} |
The number of seconds that MySQL Router waits between checking for reachability of an unreachable destination. More... | |
static const std::array< const char *, 3 > | kAccessModeNames |
static const std::array< const char *, 5 > | kRoutingStrategyNames |
|
strong |
|
strong |
ROUTING_EXPORT AccessMode routing::get_access_mode | ( | const std::string & | value | ) |
Returns AccessMode for its literal representation.
If no AccessMode is found for given string, AccessMode::kUndefined is returned.
value | literal representation of the access mode |
|
noexcept |
Returns literal name of given access mode.
Returns literal name of given access mode as a std:string. When the access mode is not found, empty string is returned.
access_mode | Access mode to look up |
ROUTING_EXPORT std::string routing::get_access_mode_names | ( | ) |
Get comma separated list of all access mode names.
ROUTING_EXPORT RoutingStrategy routing::get_routing_strategy | ( | const std::string & | value | ) |
Returns RoutingStrategy for its literal representation.
If no RoutingStrategy is found for given string, RoutingStrategy::kUndefined is returned.
value | literal representation of the access mode |
|
noexcept |
Returns literal name of given routing strategy.
Returns literal name of given routing strategy as a std:string. When the routing strategy is not found, empty string is returned.
routing_strategy | Routing strategy to look up |
ROUTING_EXPORT std::string routing::get_routing_strategy_names | ( | bool | metadata_cache | ) |
Get comma separated list of all routing stategy names for a given routing type (metadata cache or static)
metadata_cache | bool flag indicating if the list should contain strategies supported for metadata_cache or static routing |
|
static |
|
constexpr |
Default bind address.
|
constexpr |
Timeout waiting for handshake response from client.
The number of seconds that MySQL Router waits for a handshake response. The default value is 9 seconds (default MySQL Server minus 1).
|
constexpr |
delay in milliseconds before an idling connection may be moved to the pool when connection sharing is allowed.
|
constexpr |
Timeout connecting to destination (in seconds).
Constant defining how long we wait to establish connection with the server before we give up.
|
constexpr |
Maximum connect or handshake errors per host.
Maximum connect or handshake errors after which a host will be blocked. Such errors can happen when the client does not reply the handshake, sends an incorrect packet, or garbage.
|
constexpr |
Max number of active routes for this routing instance.
0 == no limit per route
|
constexpr |
Default net buffer length.
Default network buffer length which can be set in the MySQL Server.
This should match the default of the latest MySQL Server.
|
constexpr |
The number of seconds that MySQL Router waits between checking for reachability of an unreachable destination.
|
constexpr |
Timeout for idling clients (in seconds).
Constant defining how long (in seconds) a client can keep the connection idling. This is similar to the wait_timeout variable in the MySQL Server.
0 == no timeout used.
|
static |