Eunomia
0.1.0
A lightweight eBPF-based CloudNative Monitor tool for Container Security and Observability
|
Go to the documentation of this file.
7 #ifndef TRACKER_ALONE_H
8 #define TRACKER_ALONE_H
46 constexpr
static int MAX_PROCESS_MESSAGE_LENGTH = 1024 * 1024 * 4;
49 int stdout_pipe_fd[2];
50 char stdout_pipe_buf[MAX_PROCESS_MESSAGE_LENGTH];
52 void start_child_process();
54 void start_parent_process();
57 int handle_message_event(std::string&&
event);
int(* start_func)(int argc, char **argv)
The main func.
Definition: tracker_alone.h:24
void start_tracker()
start the separated process
Definition: tracker_alone.cpp:122
volatile bool * exiting
Definition: tracker_alone.h:17
static std::unique_ptr< tracker_alone_base > create_tracker_with_default_env(tracker_event_handler handler)
create a tracker with config
Definition: tracker_alone.cpp:161
tracker_alone_base(config_data config)
Definition: tracker_alone.cpp:155
the event handler for single type
Definition: event_handler.h:52
The single process tracker reported event.
Definition: tracker_alone.h:31
~tracker_alone_base()
Definition: tracker_alone.cpp:88
int pid
pid for the event
Definition: tracker_alone.h:34
tracker_config< tracker_alone_env, tracker_alone_event > config_data
type alias for env and config
Definition: tracker.h:65
int wait_ms_for_read
wait for the child process to write in the pipe
Definition: tracker_alone.h:22
tracker template with env and data
Definition: tracker.h:59
void handle(tracker_event< tracker_alone_event > &e)
implement this function to handle the event
Definition: tracker_alone.cpp:170
print to stdout
Definition: tracker_alone.h:70
start_func main_func
the main func
Definition: tracker_alone.h:26
std::vector< std::string > process_args
Definition: tracker_alone.h:27
the basic event type
Definition: event_handler.h:31
the tracker alone config env
Definition: tracker_alone.h:15
std::shared_ptr< event_handler< tracker_alone_event > > tracker_event_handler
type alias for event handler
Definition: tracker.h:67
seccomp_config config
Definition: seccomp_test.cpp:13
std::string process_messages
the message for the event
Definition: tracker_alone.h:38
Definition: tracker_alone.h:42