26#ifndef METADATA_CACHE_ROUTER_CS_OPTIONS_INCLUDED
27#define METADATA_CACHE_ROUTER_CS_OPTIONS_INCLUDED
46 const unsigned router_id);
60 const unsigned router_id)
const;
74 const std::string &
name,
75 const std::string &default_value,
76 std::string &out_error)
const;
79 const std::string &
name,
80 const uint32_t &default_value,
81 std::string &out_error)
const;
84 const std::string &
name,
85 const bool &default_value,
86 std::string &out_error)
const;
Represents the Router options in v2_cs_router_options view in the metadata schema.
Definition: router_cs_options.h:36
std::string get_router_option_str(const std::string &options, const std::string &name, const std::string &default_value, std::string &out_error) const
Definition: router_cs_options.cc:152
uint32_t get_router_option_bool(const std::string &options, const std::string &name, const bool &default_value, std::string &out_error) const
Definition: router_cs_options.cc:210
uint32_t get_router_option_uint(const std::string &options, const std::string &name, const uint32_t &default_value, std::string &out_error) const
Definition: router_cs_options.cc:179
bool get_use_replica_primary_as_rw() const
Get the get_use_replica_primary_as_rw boolean value assigned for a given Router in the metadata.
Definition: router_cs_options.cc:137
std::string options_str_
Definition: router_cs_options.h:88
std::optional< mysqlrouter::TargetCluster > get_target_cluster(const unsigned router_id) const
Get the target_cluster assigned for a given Router in the metadata.
Definition: router_cs_options.cc:65
std::chrono::seconds get_stats_updates_frequency() const
Get the stats updates ferquency value (in seconds) assigned for a given Router in the metadata.
Definition: router_cs_options.cc:120
std::string get_string() const
Get the raw JSON string read from the metadata during the last read_from_metadata() call.
Definition: router_cs_options.h:51
bool read_from_metadata(mysqlrouter::MySQLSession &session, const unsigned router_id)
Pupulate the object by reading the options from the metadata.
Definition: router_cs_options.cc:42
Definition: mysql_session.h:153
Definition: options.cc:49
case opt name
Definition: sslopt-case.h:33
double seconds()
Definition: task.cc:310