mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-05 16:50:34 +00:00
Use sysdig's formatter cache.
Use the sinsp_evt_formatter_cache added in https://github.com/draios/sysdig/pull/771 instead of a local cache. This simplifies the lua side quite a bit, as it only needs to call format_output(), and clean up everything via free_formatters() in output_cleanup(). On the C side, use a sinsp_evt_formatter object and use it in format_event().
This commit is contained in:
@@ -39,8 +39,13 @@ class falco_formats
|
||||
// falco.free_formatter(formatter)
|
||||
static int free_formatter(lua_State *ls);
|
||||
|
||||
// falco.free_formatters()
|
||||
static int free_formatters(lua_State *ls);
|
||||
|
||||
// formatted_string = falco.format_event(evt, formatter)
|
||||
static int format_event(lua_State *ls);
|
||||
|
||||
static sinsp* s_inspector;
|
||||
static sinsp_evt_formatter_cache *s_formatters;
|
||||
static bool s_json_output;
|
||||
};
|
||||
|
Reference in New Issue
Block a user