Skip to content

Commit

Permalink
config/config_store property_aliases() property_names_and_aliases()
Browse files Browse the repository at this point in the history
property_aliases() mirrors property_names()
and both get merged in property_names_and_aliases(), to be used instead
of property_names when filtering/scanning over user input
  • Loading branch information
andijcr committed Dec 15, 2023
1 parent 35ed706 commit bebf4aa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/v/config/config_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,21 @@ class config_store {
return result;
}

std::set<std::string_view> property_aliases() const {
std::set<std::string_view> result;
for (const auto& i : _aliases) {
result.insert(i.first);
}

return result;
}

std::set<std::string_view> property_names_and_aliases() const {
auto all = property_names();
all.merge(property_aliases());
return all;
}

friend std::ostream&
operator<<(std::ostream& o, const config::config_store& c) {
o << "{ ";
Expand Down

0 comments on commit bebf4aa

Please sign in to comment.