Eunomia  0.1.0
A lightweight eBPF-based CloudNative Monitor tool for Container Security and Observability
event_handler< T > Struct Template Referenceabstract

the event handler for single type More...

#include <event_handler.h>

Inheritance diagram for event_handler< T >:
Inheritance graph
Collaboration diagram for event_handler< T >:
Collaboration graph

Public Member Functions

virtual ~event_handler ()=default
 
virtual void handle (tracker_event< T > &e)=0
 implement this function to handle the event More...
 
std::shared_ptr< event_handler< T > > add_handler (std::shared_ptr< event_handler< T >> handler)
 add a next handler after this handler More...
 
void do_handle_event (tracker_event< T > &e)
 
- Public Member Functions inherited from event_handler_base< T >
virtual ~event_handler_base ()=default
 

Public Attributes

std::shared_ptr< event_handler_base< T > > next_handler = nullptr
 

Detailed Description

template<typename T>
struct event_handler< T >

the event handler for single type

all single type event hanlder should inherit from this class

Constructor & Destructor Documentation

◆ ~event_handler()

template<typename T >
virtual event_handler< T >::~event_handler ( )
virtualdefault

Member Function Documentation

◆ add_handler()

template<typename T >
std::shared_ptr<event_handler<T> > event_handler< T >::add_handler ( std::shared_ptr< event_handler< T >>  handler)
inline

add a next handler after this handler

◆ do_handle_event()

template<typename T >
void event_handler< T >::do_handle_event ( tracker_event< T > &  e)
inlinevirtual

do the handle event pass the event to next handler

Implements event_handler_base< T >.

◆ handle()

template<typename T >
virtual void event_handler< T >::handle ( tracker_event< T > &  e)
pure virtual

implement this function to handle the event

Implements event_handler_base< T >.

Implemented in bindsnoop_tracker::prometheus_event_handler, opensnoop_tracker::prometheus_event_handler, sigsnoop_tracker::prometheus_event_handler, mountsnoop_tracker::prometheus_event_handler, tracker_alone_base::plain_text_event_printer, capable_tracker::prometheus_event_handler, tcpconnlat_tracker::prometheus_event_handler, tcp_tracker::csv_event_printer, tcp_tracker::plain_text_event_printer, tcp_tracker::json_event_printer, tcp_tracker::prometheus_event_handler, rule_base< syscall_event >, syscall_tracker::csv_event_printer, syscall_tracker::plain_text_event_printer, syscall_tracker::json_event_printer, syscall_tracker::prometheus_event_handler, rule_base< process_event >, process_tracker::csv_event_printer, process_tracker::plain_text_event_printer, process_tracker::json_event_printer, process_tracker::prometheus_event_handler, container_manager::container_tracking_handler, ipc_tracker::csv_event_printer, ipc_tracker::plain_text_event_printer, ipc_tracker::json_event_printer, rule_base< files_event >, files_tracker::csv_event_printer, files_tracker::plain_text_event_printer, files_tracker::json_event_printer, files_tracker::prometheus_event_handler, rule_base< EVNET >, tracker_with_config< ENV, EVENT >::csv_event_printer, tracker_with_config< ENV, EVENT >::json_event_printer, tracker_with_config< ENV, EVENT >::plain_text_event_printer, tracker_with_config< ENV, EVENT >::prometheus_event_handler, and container_manager::container_info_handler< EVENT >.

Here is the caller graph for this function:

Member Data Documentation

◆ next_handler

template<typename T >
std::shared_ptr<event_handler_base<T> > event_handler< T >::next_handler = nullptr

The documentation for this struct was generated from the following file: