chore(userspace/engine): clean up unused code

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
Leonardo Grasso
2020-09-22 18:18:16 +02:00
committed by poiana
parent 78fa43708b
commit 0ff220de1e
2 changed files with 60 additions and 143 deletions

View File

@@ -18,7 +18,8 @@ limitations under the License.
#include "sinsp.h"
extern "C" {
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
@@ -31,37 +32,28 @@ class sinsp_evt_formatter;
class falco_formats
{
public:
static void init(sinsp* inspector,
public:
static void init(sinsp *inspector,
falco_engine *engine,
lua_State *ls,
bool json_output,
bool json_include_output_property);
// formatter = falco.formatter(format_string)
static int formatter(lua_State *ls);
static int lua_formatter(lua_State *ls);
// falco.free_formatter(formatter)
static int free_formatter(lua_State *ls);
static int lua_free_formatter(lua_State *ls);
static void free_formatters();
// falco.free_formatters()
static int free_formatters_lua(lua_State *ls);
static string format_event(const gen_event *evt, const std::string &rule, const std::string &source,
const std::string &level, const std::string &format);
static string format_event(const gen_event* evt, const std::string &rule, const std::string &source,
const std::string &level, const std::string &format);
static map<string, string> resolve_tokens(const gen_event *evt, const std::string &source,
const std::string &format);
// formatted_string = falco.format_event(evt, formatter)
static int format_event_lua(lua_State *ls);
static map<string, string> resolve_tokens(const gen_event* evt, const std::string &source,
const std::string &format);
// resolve_tokens = falco.resolve_tokens(evt, formatter)
static int resolve_tokens_lua(lua_State *ls);
static sinsp* s_inspector;
static sinsp *s_inspector;
static falco_engine *s_engine;
static sinsp_evt_formatter_cache *s_formatters;
static bool s_json_output;