From c7ac1ef61b8fc4c598910ea4973410b19372d888 Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato Date: Tue, 7 Jul 2020 17:09:50 +0000 Subject: [PATCH] update(userspace/engine): const correctness for json_event class Co-authored-by: Nathan Baker Signed-off-by: Leonardo Di Donato --- userspace/engine/json_evt.cpp | 2 +- userspace/engine/json_evt.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/userspace/engine/json_evt.cpp b/userspace/engine/json_evt.cpp index 50f643d3..61cdc90d 100644 --- a/userspace/engine/json_evt.cpp +++ b/userspace/engine/json_evt.cpp @@ -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; } diff --git a/userspace/engine/json_evt.h b/userspace/engine/json_evt.h index 9c32cc8c..34d59aec 100644 --- a/userspace/engine/json_evt.h +++ b/userspace/engine/json_evt.h @@ -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;