2022-12-20 15:11:51 +00:00
|
|
|
package fflag
|
|
|
|
|
2022-12-26 13:23:41 +00:00
|
|
|
var Crowdsec = FeatureRegister{EnvPrefix: "CROWDSEC_FEATURE_"}
|
2022-12-21 16:19:20 +00:00
|
|
|
|
2023-01-17 11:27:48 +00:00
|
|
|
var CscliSetup = &Feature{Name: "cscli_setup", Description: "Enable cscli setup command (service detection)"}
|
2023-01-09 13:49:21 +00:00
|
|
|
var DisableHttpRetryBackoff = &Feature{Name: "disable_http_retry_backoff", Description: "Disable http retry backoff"}
|
2023-02-20 14:26:30 +00:00
|
|
|
var ChunkedDecisionsStream = &Feature{Name: "chunked_decisions_stream", Description: "Enable chunked decisions stream"}
|
2023-12-18 08:35:57 +00:00
|
|
|
var PapiClient = &Feature{Name: "papi_client", Description: "Enable Polling API client", State: DeprecatedState}
|
2023-03-28 14:26:47 +00:00
|
|
|
var Re2GrokSupport = &Feature{Name: "re2_grok_support", Description: "Enable RE2 support for GROK patterns"}
|
|
|
|
var Re2RegexpInfileSupport = &Feature{Name: "re2_regexp_in_file_support", Description: "Enable RE2 support for RegexpInFile expr helper"}
|
2022-12-26 13:23:41 +00:00
|
|
|
|
|
|
|
func RegisterAllFeatures() error {
|
|
|
|
err := Crowdsec.RegisterFeature(CscliSetup)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-12-18 08:35:57 +00:00
|
|
|
|
2023-01-09 13:49:21 +00:00
|
|
|
err = Crowdsec.RegisterFeature(DisableHttpRetryBackoff)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-12-18 08:35:57 +00:00
|
|
|
|
2023-02-20 14:26:30 +00:00
|
|
|
err = Crowdsec.RegisterFeature(ChunkedDecisionsStream)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-12-18 08:35:57 +00:00
|
|
|
|
2023-01-31 13:47:44 +00:00
|
|
|
err = Crowdsec.RegisterFeature(PapiClient)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-12-18 08:35:57 +00:00
|
|
|
|
2023-03-28 14:26:47 +00:00
|
|
|
err = Crowdsec.RegisterFeature(Re2GrokSupport)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2023-12-18 08:35:57 +00:00
|
|
|
|
2023-03-28 14:26:47 +00:00
|
|
|
err = Crowdsec.RegisterFeature(Re2RegexpInfileSupport)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2022-12-26 13:23:41 +00:00
|
|
|
return nil
|
2022-12-20 15:11:51 +00:00
|
|
|
}
|