Live: Allow setting the engine password (#76289)

This commit is contained in:
João Calisto
2023-10-11 09:45:24 +01:00
committed by GitHub
parent 9101eb219c
commit d5691e6dd1
4 changed files with 13 additions and 3 deletions
+4 -2
View File
@@ -124,8 +124,9 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
// will be connected over Redis PUB/SUB. Presence will work
// globally since kept inside Redis.
redisAddress := g.Cfg.LiveHAEngineAddress
redisPassword := g.Cfg.LiveHAEnginePassword
redisShardConfigs := []centrifuge.RedisShardConfig{
{Address: redisAddress},
{Address: redisAddress, Password: redisPassword},
}
var redisShards []*centrifuge.RedisShard
for _, redisConf := range redisShardConfigs {
@@ -160,7 +161,8 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
var managedStreamRunner *managedstream.Runner
if g.IsHA() {
redisClient := redis.NewClient(&redis.Options{
Addr: g.Cfg.LiveHAEngineAddress,
Addr: g.Cfg.LiveHAEngineAddress,
Password: g.Cfg.LiveHAEnginePassword,
})
cmd := redisClient.Ping(context.Background())
if _, err := cmd.Result(); err != nil {