update(userspace/engine): const correctness for json_event class

Co-authored-by: Nathan Baker <nathan.baker@sysdig.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato 2020-07-07 17:09:50 +00:00 committed by poiana
parent 5fd3c38422
commit c7ac1ef61b
2 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ const json &json_event::jevt()
return m_jevt;
}
uint64_t json_event::get_ts()
uint64_t json_event::get_ts() const
{
return m_event_ts;
}

View File

@ -38,14 +38,14 @@ public:
void set_jevt(nlohmann::json &evt, uint64_t ts);
const nlohmann::json &jevt();
uint64_t get_ts();
uint64_t get_ts() const;
inline uint16_t get_source()
inline uint16_t get_source() const
{
return ESRC_K8S_AUDIT;
}
inline uint16_t get_type()
inline uint16_t get_type() const
{
// All k8s audit events have the single tag "1". - see falco_engine::process_k8s_audit_event
return 1;