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

Function Init

pkg/exprhelpers/helpers.go:120–130  ·  view source on GitHub ↗
(databaseClient *database.Client)

Source from the content-addressed store, hash-verified

118}
119
120func Init(databaseClient *database.Client) error {
121 dataFile = make(map[string][]string)
122 dataFileRegex = make(map[string][]*regexp.Regexp)
123 dataFileRe2 = make(map[string][]*re2.Regexp)
124 dataFileMap = make(map[string]*fileMapEntry)
125 dbClient = databaseClient
126
127 XMLCacheInit()
128
129 return nil
130}
131
132// ResetDataFiles clears all datafile-related global variables.
133// This should be called during HUP reload to ensure clean state.

Callers 15

TestBadConfigurationFunction · 0.92
TestQueryBuilderFunction · 0.92
TestLiveAcquisitionFunction · 0.92
TestOneShotFunction · 0.92
TestEvaluateProfileFunction · 0.92
prepTestsFunction · 0.92
TestBucketFunction · 0.92
ServeFunction · 0.92
newReinjectCmdMethod · 0.92
newContextDetectCmdMethod · 0.92
TestXMLGetAttributeValueFunction · 0.85
TestXMLGetNodeValueFunction · 0.85

Calls 1

XMLCacheInitFunction · 0.85

Tested by 15

TestBadConfigurationFunction · 0.74
TestQueryBuilderFunction · 0.74
TestLiveAcquisitionFunction · 0.74
TestOneShotFunction · 0.74
TestEvaluateProfileFunction · 0.74
prepTestsFunction · 0.74
TestBucketFunction · 0.74
TestXMLGetAttributeValueFunction · 0.68
TestXMLGetNodeValueFunction · 0.68
TestVisitorFunction · 0.68
TestMatchFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…