#include <userver/ydb/topic_writer.hpp>
Manages a collection of named YDB topic writers.
Provides access to individual TopicWriter instances by name, and aggregates their statistics.
Definition at line 120 of file topic_writer.hpp.
◆ TopicWriterManager()
| ydb::TopicWriterManager::TopicWriterManager |
( |
std::unordered_map< std::string, TopicWriterSettings > | settings | ) |
|
|
explicit |
Constructs a TopicWriterManager with the given per-topic settings.
- Parameters
-
| settings | map from topic writer name to its settings; the keys become the names used to look up writers via GetTopicWriter |
◆ GetTopicWriter()
| TopicWriter & ydb::TopicWriterManager::GetTopicWriter |
( |
std::string_view | name | ) |
|
Returns the topic writer for the provided name.
- Parameters
-
| name | key that was used in the settings map passed to the constructor; determines which topic writer is returned |
- Returns
- reference to the particular topic writer, or throws an exception no topic writer with the specified name
◆ DumpMetric
Dumps aggregated metrics for all topic writers into the statistics writer.
- Parameters
-
| writer | statistics writer to dump into |
| manager | the topic writer manager whose metrics to dump |
The documentation for this class was generated from the following file: