#include <userver/dynamic_config/snapshot.hpp>
The shared snapshot of dynamic configs. Cheap to copy, even cheaper to move. Thread safe, not updated with new dynamic config values in background (it's a snapshot!).
When a config update comes in via new DocsMap
, configs of all the registered types are constructed and stored in Config
. After that the DocsMap
is dropped.
Config types are automatically registered if they are used somewhere in the program.
Definition at line 131 of file snapshot.hpp.
Public Member Functions | |
Snapshot (const Snapshot &) | |
Snapshot & | operator= (const Snapshot &) |
Snapshot (Snapshot &&) noexcept | |
Snapshot & | operator= (Snapshot &&) noexcept |
template<typename VariableType > | |
const VariableType & | operator[] (const Key< VariableType > &key) const & |
Used to access individual configs in the type-safe config map. | |
template<typename VariableType > | |
const VariableType & | operator[] (const Key< VariableType > &) && |
Used to access individual configs in the type-safe config map. | |
const VariableType & dynamic_config::Snapshot::operator[] | ( | const Key< VariableType > & | ) | && |
Used to access individual configs in the type-safe config map.
Definition at line 261 of file snapshot.hpp.
const VariableType & dynamic_config::Snapshot::operator[] | ( | const Key< VariableType > & | key | ) | const & |
Used to access individual configs in the type-safe config map.
Definition at line 256 of file snapshot.hpp.
|
friend |
Definition at line 161 of file snapshot.hpp.