mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
config: add operator<< for seed_provider_type
Following patch will start checking allowed_values in named_value and print errors for wrong values. This will require all the types used with named_value to have operator<< implemented. seed_provider_type is one such type. Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com>
This commit is contained in:
10
db/config.cc
10
db/config.cc
@@ -791,6 +791,16 @@ void db::config::maybe_in_workdir(named_value<string_list>& tos, const char* sub
|
||||
|
||||
const sstring db::config::default_tls_priority("SECURE128:-VERS-TLS1.0");
|
||||
|
||||
|
||||
namespace db {
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const db::seed_provider_type& s) {
|
||||
os << "seed_provider_type{class=" << s.class_name << ", params=" << s.parameters << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace utils {
|
||||
|
||||
template<>
|
||||
|
||||
@@ -59,10 +59,14 @@ struct seed_provider_type {
|
||||
bool operator==(const seed_provider_type& other) const {
|
||||
return class_name == other.class_name && parameters == other.parameters;
|
||||
}
|
||||
friend std::ostream& operator<<(std::ostream& os, const seed_provider_type&);
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const db::seed_provider_type& s);
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace utils {
|
||||
|
||||
sstring config_value_as_json(const db::seed_provider_type& v);
|
||||
|
||||
Reference in New Issue
Block a user