MySQL 8.0.40
Source Code Documentation
UnreachableDestinationsQuarantine::Unreachable_destination_candidate Struct Reference

Class representing a single entry (destination) in quarantined destination set. More...

Public Types

enum class  Function { kInitDestination , kConnectFinish }
 
using server_protocol_type = net::ip::tcp
 

Public Member Functions

 Unreachable_destination_candidate (net::io_context *io_ctx, const mysql_harness::TCPAddress &addr, std::vector< std::string > referencing_instances, std::chrono::seconds quarantine_interval, std::function< void()> on_delete, std::function< void()> on_connect_ok)
 
 ~Unreachable_destination_candidate ()
 
 Unreachable_destination_candidate (Unreachable_destination_candidate &&)=default
 
Unreachable_destination_candidateoperator= (Unreachable_destination_candidate &&)=default
 
 Unreachable_destination_candidate (const Unreachable_destination_candidate &)=delete
 
Unreachable_destination_candidateoperator= (const Unreachable_destination_candidate &)=delete
 
stdx::expected< void, std::error_code > connect ()
 
stdx::expected< void, std::error_code > resolve ()
 
stdx::expected< void, std::error_code > init_endpoint ()
 
stdx::expected< void, std::error_code > next_endpoint ()
 
stdx::expected< void, std::error_code > connect_init ()
 
stdx::expected< void, std::error_code > try_connect ()
 
stdx::expected< void, std::error_code > connect_finish ()
 
stdx::expected< void, std::error_code > connected ()
 

Public Attributes

net::io_contextio_ctx_
 
mysql_harness::TCPAddress address_
 
std::vector< std::string > referencing_routing_instances_
 
std::chrono::seconds quarantine_interval_
 
net::steady_timer timer_
 
net::ip::tcp::resolver::results_type endpoints_
 
net::ip::tcp::resolver::results_type::iterator endpoints_it_
 
server_protocol_type::socket server_sock_ {*io_ctx_}
 
server_protocol_type::endpoint server_endpoint_
 
bool connect_timed_out_ {false}
 
bool connected_ {false}
 
Function func_ {Function::kInitDestination}
 
std::error_code last_ec_
 
std::function< void()> on_delete_
 
std::function< void()> on_connect_ok_
 

Detailed Description

Class representing a single entry (destination) in quarantined destination set.

Each destination has its own timer responsible for doing asynchronous availability checks and a list of names of routing instances that currently reference this destination candidate.

Member Typedef Documentation

◆ server_protocol_type

Member Enumeration Documentation

◆ Function

Enumerator
kInitDestination 
kConnectFinish 

Constructor & Destructor Documentation

◆ Unreachable_destination_candidate() [1/3]

UnreachableDestinationsQuarantine::Unreachable_destination_candidate::Unreachable_destination_candidate ( net::io_context io_ctx,
const mysql_harness::TCPAddress addr,
std::vector< std::string >  referencing_instances,
std::chrono::seconds  quarantine_interval,
std::function< void()>  on_delete,
std::function< void()>  on_connect_ok 
)
inline

◆ ~Unreachable_destination_candidate()

UnreachableDestinationsQuarantine::Unreachable_destination_candidate::~Unreachable_destination_candidate ( )

◆ Unreachable_destination_candidate() [2/3]

UnreachableDestinationsQuarantine::Unreachable_destination_candidate::Unreachable_destination_candidate ( Unreachable_destination_candidate &&  )
default

◆ Unreachable_destination_candidate() [3/3]

UnreachableDestinationsQuarantine::Unreachable_destination_candidate::Unreachable_destination_candidate ( const Unreachable_destination_candidate )
delete

Member Function Documentation

◆ connect()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connect ( )

◆ connect_finish()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connect_finish ( )

◆ connect_init()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connect_init ( )

◆ connected()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connected ( )

◆ init_endpoint()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::init_endpoint ( )

◆ next_endpoint()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::next_endpoint ( )

◆ operator=() [1/2]

Unreachable_destination_candidate & UnreachableDestinationsQuarantine::Unreachable_destination_candidate::operator= ( const Unreachable_destination_candidate )
delete

◆ operator=() [2/2]

Unreachable_destination_candidate & UnreachableDestinationsQuarantine::Unreachable_destination_candidate::operator= ( Unreachable_destination_candidate &&  )
default

◆ resolve()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::resolve ( )

◆ try_connect()

stdx::expected< void, std::error_code > UnreachableDestinationsQuarantine::Unreachable_destination_candidate::try_connect ( )

Member Data Documentation

◆ address_

mysql_harness::TCPAddress UnreachableDestinationsQuarantine::Unreachable_destination_candidate::address_

◆ connect_timed_out_

bool UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connect_timed_out_ {false}

◆ connected_

bool UnreachableDestinationsQuarantine::Unreachable_destination_candidate::connected_ {false}

◆ endpoints_

net::ip::tcp::resolver::results_type UnreachableDestinationsQuarantine::Unreachable_destination_candidate::endpoints_

◆ endpoints_it_

net::ip::tcp::resolver::results_type::iterator UnreachableDestinationsQuarantine::Unreachable_destination_candidate::endpoints_it_

◆ func_

Function UnreachableDestinationsQuarantine::Unreachable_destination_candidate::func_ {Function::kInitDestination}

◆ io_ctx_

net::io_context* UnreachableDestinationsQuarantine::Unreachable_destination_candidate::io_ctx_

◆ last_ec_

std::error_code UnreachableDestinationsQuarantine::Unreachable_destination_candidate::last_ec_
Initial value:
{
make_error_code(std::errc::no_such_file_or_directory)}
std::error_code make_error_code(DynamicLoaderErrc ec)
make error_code from a DynamicLoaderErrc.
Definition: dynamic_loader.cc:79

◆ on_connect_ok_

std::function<void()> UnreachableDestinationsQuarantine::Unreachable_destination_candidate::on_connect_ok_

◆ on_delete_

std::function<void()> UnreachableDestinationsQuarantine::Unreachable_destination_candidate::on_delete_

◆ quarantine_interval_

std::chrono::seconds UnreachableDestinationsQuarantine::Unreachable_destination_candidate::quarantine_interval_

◆ referencing_routing_instances_

std::vector<std::string> UnreachableDestinationsQuarantine::Unreachable_destination_candidate::referencing_routing_instances_

◆ server_endpoint_

server_protocol_type::endpoint UnreachableDestinationsQuarantine::Unreachable_destination_candidate::server_endpoint_

◆ server_sock_

server_protocol_type::socket UnreachableDestinationsQuarantine::Unreachable_destination_candidate::server_sock_ {*io_ctx_}

◆ timer_

net::steady_timer UnreachableDestinationsQuarantine::Unreachable_destination_candidate::timer_

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