27struct DynamicSettings
final {
32 explicit HostPort(std::string host = {},
int port = 0)
noexcept : host(std::move(host)), port(port) {}
35 std::vector<std::string> shards;
41 storages::
redis::ConnectionSecurity secure_connection{storages::
redis::ConnectionSecurity::kNone};
42 std::size_t database_index{0};
43 ShardingStrategy sharding_strategy;
44 bool allow_reads_from_master =
false;
57 DynamicRedis() =
default;
59 void Init(std::shared_ptr<impl::ThreadPools> thread_pools, testsuite::
RedisControl testsuite_redis_control);
68 bool AddClient(
const std::string& name,
const DynamicSettings& settings, dynamic_config::Source& config);
83 const std::string& name,
97 void OnConfigUpdate(
const dynamic_config::Snapshot& cfg);
100 std::shared_ptr<impl::ThreadPools> thread_pools_;
103 concurrent::Variable<std::unordered_map<std::string, std::shared_ptr<ClientImpl>>, engine::SharedMutex>