add redis database selection (#100)

*  add redis database selection

* 📝 update docs

* 📝 readme
This commit is contained in:
maxlerebourg
2023-05-25 17:20:14 +02:00
committed by GitHub
parent abae7ee028
commit 0c2668d578
10 changed files with 57 additions and 33 deletions
+6 -1
View File
@@ -142,7 +142,12 @@ func New(ctx context.Context, next http.Handler, config *configuration.Config, n
cacheClient: &cache.Client{},
}
config.RedisCachePassword, _ = configuration.GetVariable(config, "RedisCachePassword")
bouncer.cacheClient.New(config.RedisCacheEnabled, config.RedisCacheHost, config.RedisCachePassword)
bouncer.cacheClient.New(
config.RedisCacheEnabled,
config.RedisCacheHost,
config.RedisCachePassword,
config.RedisCacheDatabase,
)
if (config.CrowdsecMode == configuration.StreamMode || config.CrowdsecMode == configuration.AloneMode) && ticker == nil {
if config.CrowdsecMode == configuration.AloneMode {