using TOPNSPC::common::cmdmap_from_json;
using TOPNSPC::common::cmd_getval;
-class MMonCommand : public PaxosServiceMessage {
+class MMonCommand final : public PaxosServiceMessage {
public:
// weird note: prior to octopus, MgrClient would leave fsid blank when
// sending commands to the mgr. Starting with octopus, this is either
{ }
private:
- ~MMonCommand() override {}
+ ~MMonCommand() final {}
public:
std::string_view get_type_name() const override { return "mon_command"; }
void print(std::ostream& o) const override {
cmdmap_t cmdmap;
- stringstream ss;
- string prefix;
+ std::ostringstream ss;
+ std::string prefix;
cmdmap_from_json(cmd, &cmdmap, ss);
cmd_getval(cmdmap, "prefix", prefix);
// Some config values contain sensitive data, so don't log them
o << "mon_command(";
if (prefix == "config set") {
- string name;
+ std::string name;
cmd_getval(cmdmap, "name", name);
o << "[{prefix=" << prefix << ", name=" << name << "}]";
} else if (prefix == "config-key set") {
- string key;
+ std::string key;
cmd_getval(cmdmap, "key", key);
o << "[{prefix=" << prefix << ", key=" << key << "}]";
} else {