MySQL 9.1.0
Source Code Documentation
|
Destination to forward client connections to. More...
#include <destination.h>
Public Member Functions | |
Destination (std::string id, std::string hostname, uint16_t port) | |
virtual | ~Destination ()=default |
std::string | id () const |
unique, opaque identifier of a destination. More... | |
std::string | hostname () const |
hostname to connect to. More... | |
uint16_t | port () const noexcept |
TCP port to connect to. More... | |
virtual bool | good () const |
check if the destination is "good". More... | |
virtual void | connect_status (std::error_code) |
status of the last failed connect(). More... | |
virtual mysqlrouter::ServerMode | server_mode () const |
server-mode of the destination. More... | |
Private Attributes | |
const std::string | id_ |
const std::string | hostname_ |
const uint16_t | port_ |
Destination to forward client connections to.
It is used between the RouteDestination implementations and MySQLRouting
|
inline |
|
virtualdefault |
|
inlinevirtual |
status of the last failed connect().
called by MySQLRouting after a connect() to all addresses of the destination failed.
Reimplemented in FirstAvailableDestination, MetadataCacheDestination, and StateTrackingDestination.
|
inlinevirtual |
check if the destination is "good".
If the destination is not "good", it will be skipped by MySQLRouting.
false | if destination is known to be bad |
true | otherwise |
Reimplemented in StateTrackingDestination.
|
inline |
hostname to connect to.
|
inline |
unique, opaque identifier of a destination.
used by connection container to find allowed destinations.
|
inlinenoexcept |
TCP port to connect to.
|
inlinevirtual |
server-mode of the destination.
may be: unavailable, read-only or read-write.
Reimplemented in MetadataCacheDestination.
|
private |
|
private |
|
private |