MCPcopy
hub / github.com/crowdsecurity/crowdsec / MakeEvent

Function MakeEvent

pkg/pipeline/event.go:48–63  ·  view source on GitHub ↗
(timeMachine bool, evtType int, process bool)

Source from the content-addressed store, hash-verified

46}
47
48func MakeEvent(timeMachine bool, evtType int, process bool) Event {
49 evt := Event{
50 Parsed: make(map[string]string),
51 Meta: make(map[string]string),
52 Unmarshaled: make(map[string]any),
53 Enriched: make(map[string]string),
54 ExpectMode: LIVE,
55 Process: process,
56 Type: evtType,
57 }
58 if timeMachine {
59 evt.ExpectMode = TIMEMACHINE
60 }
61
62 return evt
63}
64
65func (e *Event) SetMeta(key string, value string) bool {
66 if e.Meta == nil {

Callers 15

AppsecEventToContextFunction · 0.92
copyEventFunction · 0.92
ParseAndPushRecordsMethod · 0.92
processRequestMethod · 0.92
OneShotMethod · 0.92
runJournalCtlMethod · 0.92
readFileMethod · 0.92
ReadMessageMethod · 0.92
readOneEntryMethod · 0.92
webhookHandlerMethod · 0.92
cwLogToEventFunction · 0.92
tailFileMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…