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 EVENT_HANDLER_H
8 #define EVENT_HANDLER_H
20 template<
typename EVENT>
71 bool is_catched =
false;
74 }
catch (
const std::exception& error) {
87 template <
typename T1,
typename T2>
101 auto event1 =
adapt(e);
virtual tracker_event< T1 > adapt(tracker_event< T2 > &e)=0
std::shared_ptr< event_handler_base< T2 > > next_handler
Definition: event_handler.h:90
virtual void do_handle_event(tracker_event< T > &e)=0
the event handler for single type
Definition: event_handler.h:52
the event handler for share_ptr
Definition: event_handler.h:40
container info
Definition: container_info.h:32
virtual ~event_handler()=default
void do_handle_event(tracker_event< T2 > &e)
Definition: event_handler.h:99
container_info ct_info
Definition: event_handler.h:34
Event handler type switcher.
Definition: event_handler.h:88
virtual void handle(tracker_event< T > &e)=0
implement this function to handle the event
virtual void handle(tracker_event< T > &e)=0
virtual ~event_handler_adapter()=default
the basic event type
Definition: event_handler.h:31
std::shared_ptr< event_handler< T1 > > add_handler(std::shared_ptr< event_handler< T1 >> handler)
Definition: event_handler.h:94
void do_handle_event(tracker_event< T > &e)
Definition: event_handler.h:69
virtual ~event_handler_base()=default
std::shared_ptr< event_handler_base< T > > next_handler
Definition: event_handler.h:54
concept event_concept
concept for a eunomia event
Definition: event_handler.h:21
T data
Definition: event_handler.h:33
std::shared_ptr< event_handler< T > > add_handler(std::shared_ptr< event_handler< T >> handler)
add a next handler after this handler
Definition: event_handler.h:62