Documentation ¶
Overview ¶
Package examples provides an example of how to use the event monitor module using a basic consumer
Index ¶
- type SimpleEvent
- type SimpleEventConsumer
- func (fc *SimpleEventConsumer) AddHandler(handler func(evt *SimpleEvent))
- func (fc *SimpleEventConsumer) ChanSize() int
- func (fc *SimpleEventConsumer) Copy(event *smodel.Event) any
- func (fc *SimpleEventConsumer) EventTypes() []model.EventType
- func (fc *SimpleEventConsumer) ExecCount() int
- func (fc *SimpleEventConsumer) ExitCount() int
- func (fc *SimpleEventConsumer) ForkCount() int
- func (fc *SimpleEventConsumer) HandleEvent(event any)
- func (fc *SimpleEventConsumer) ID() string
- func (fc *SimpleEventConsumer) Start() error
- func (fc *SimpleEventConsumer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleEvent ¶
type SimpleEvent struct { Type uint32 `copy:"GetEventType;event:*;cast:uint32"` ExecFilePath string `copy:"GetExecFilePath;event:ExecEventType"` Envp []string `copy:"GetProcessEnvp;event:ExecEventType"` }
SimpleEvent defines a simple event
type SimpleEventConsumer ¶
SimpleEventConsumer defines a simple event consumer
func NewSimpleEventConsumer ¶
func NewSimpleEventConsumer(em *eventmonitor.EventMonitor) *SimpleEventConsumer
NewSimpleEventConsumer returns a new simple event consumer
func (*SimpleEventConsumer) AddHandler ¶
func (fc *SimpleEventConsumer) AddHandler(handler func(evt *SimpleEvent))
AddHandler adds a handler to this consumer
func (*SimpleEventConsumer) ChanSize ¶
func (fc *SimpleEventConsumer) ChanSize() int
ChanSize returns the chan size used by the consumer
func (*SimpleEventConsumer) EventTypes ¶
func (fc *SimpleEventConsumer) EventTypes() []model.EventType
EventTypes returns the event types handled by this consumer Implement the consumer interface
func (*SimpleEventConsumer) ExecCount ¶
func (fc *SimpleEventConsumer) ExecCount() int
ExecCount returns the number of exec handled
func (*SimpleEventConsumer) ExitCount ¶
func (fc *SimpleEventConsumer) ExitCount() int
ExitCount returns the number of exit handled
func (*SimpleEventConsumer) ForkCount ¶
func (fc *SimpleEventConsumer) ForkCount() int
ForkCount returns the number of fork handled
func (*SimpleEventConsumer) HandleEvent ¶
func (fc *SimpleEventConsumer) HandleEvent(event any)
HandleEvent handles this event Implement the consumer interface
func (*SimpleEventConsumer) ID ¶
func (fc *SimpleEventConsumer) ID() string
ID returns the ID of this consumer Implement the consumer interface
func (*SimpleEventConsumer) Start ¶
func (fc *SimpleEventConsumer) Start() error
Start the consumer Implement the consumer interface
func (*SimpleEventConsumer) Stop ¶
func (fc *SimpleEventConsumer) Stop()
Stop the consumer Implement the consumer interface