25 static constexpr char ConfigProfile[] =
"default";
27 TPatchableField(TString name, T defaultValue)
28 : Name_(std::move(name))
29 , Value_(std::move(defaultValue))
32 const T& Get(
const IClientPtr& client)
35 const auto& clusterConfig = NDetail::GetDynamicConfiguration(client, ConfigProfile);
36 auto iter = clusterConfig.find(Name_);
38 if (iter->second.IsOfType<T>()) {
39 Value_ = iter->second.As<T>();
41 ythrow yexception() << Name_ <<
" must be " <<
typeid(T).name();
48 void Set(
const T& value)
57 bool Patched_ =
false;