mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-11 03:29:33 +00:00
cleanup(falco): apply review suggestion about extra_output_field_t
Signed-off-by: Luca Guerra <luca@guerra.sh> Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
@@ -72,3 +72,5 @@ namespace falco_common
|
||||
|
||||
bool parse_rule_matching(const std::string& v, rule_matching& out);
|
||||
};
|
||||
|
||||
typedef std::unordered_map<std::string, std::pair<std::string, bool>> extra_output_field_t;
|
||||
|
@@ -221,7 +221,7 @@ public:
|
||||
std::string format;
|
||||
std::set<std::string> exception_fields;
|
||||
std::set<std::string> tags;
|
||||
std::unordered_map<std::string, std::pair<std::string, bool>> extra_output_fields;
|
||||
extra_output_field_t extra_output_fields;
|
||||
};
|
||||
|
||||
//
|
||||
|
@@ -79,7 +79,7 @@ struct falco_rule
|
||||
std::string name;
|
||||
std::string description;
|
||||
std::string output;
|
||||
std::unordered_map<std::string, std::pair<std::string, bool>> extra_output_fields;
|
||||
extra_output_field_t extra_output_fields;
|
||||
std::set<std::string> tags;
|
||||
std::set<std::string> exception_fields;
|
||||
falco_common::priority_type priority;
|
||||
|
@@ -35,7 +35,7 @@ falco_formats::~falco_formats()
|
||||
|
||||
std::string falco_formats::format_event(sinsp_evt *evt, const std::string &rule, const std::string &source,
|
||||
const std::string &level, const std::string &format, const std::set<std::string> &tags,
|
||||
const std::string &hostname, const std::unordered_map<std::string, std::pair<std::string, bool>> &extra_fields) const
|
||||
const std::string &hostname, const extra_output_field_t &extra_fields) const
|
||||
{
|
||||
std::string line;
|
||||
|
||||
|
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
std::string format_event(sinsp_evt *evt, const std::string &rule, const std::string &source,
|
||||
const std::string &level, const std::string &format, const std::set<std::string> &tags,
|
||||
const std::string &hostname, const std::unordered_map<std::string, std::pair<std::string, bool>> &extra_fields) const;
|
||||
const std::string &hostname, const extra_output_field_t &extra_fields) const;
|
||||
|
||||
std::string format_string(sinsp_evt *evt, const std::string &format, const std::string &source) const;
|
||||
|
||||
|
Reference in New Issue
Block a user