From d15c63627ccbf35a4215da2679a2b968e09153ea Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Mon, 15 Jul 2019 07:51:55 +0000 Subject: [PATCH] sstables.hh: Add attribute description API to file extension --- sstables/sstables.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sstables/sstables.hh b/sstables/sstables.hh index b18212ebf5..54f1ab8b51 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -33,6 +33,7 @@ #include #include #include +#include #include "types.hh" #include "clustering_key_filter.hh" #include @@ -948,6 +949,15 @@ class file_io_extension { public: virtual ~file_io_extension() {} virtual future wrap_file(sstable&, component_type, file, open_flags flags) = 0; + // optionally return a map of attributes for a given sstable, + // suitable for "describe". + // This would preferably be interesting info on what/why the extension did + // to this table. + using attr_value_type = std::variant>; + using attr_value_map = std::map; + virtual attr_value_map get_attributes(const sstable&) const { + return {}; + } }; }