[v11.0.x]: Live: Add ha_prefix (#93759) (#93926)

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
This commit is contained in:
Stephanie Hingtgen
2024-09-27 14:20:43 -05:00
committed by GitHub
co-authored by Todd Treece
parent f107b0db60
commit 12dd28d04d
6 changed files with 46 additions and 9 deletions
+3
View File
@@ -424,6 +424,8 @@ type Cfg struct {
// LiveHAEngine is a type of engine to use to achieve HA with Grafana Live.
// Zero value means in-memory single node setup.
LiveHAEngine string
// LiveHAPRefix is a prefix for HA engine keys.
LiveHAPrefix string
// LiveHAEngineAddress is a connection address for Live HA engine.
LiveHAEngineAddress string
LiveHAEnginePassword string
@@ -1972,6 +1974,7 @@ func (cfg *Cfg) readLiveSettings(iniFile *ini.File) error {
default:
return fmt.Errorf("unsupported live HA engine type: %s", cfg.LiveHAEngine)
}
cfg.LiveHAPrefix = section.Key("ha_prefix").MustString("")
cfg.LiveHAEngineAddress = section.Key("ha_engine_address").MustString("127.0.0.1:6379")
cfg.LiveHAEnginePassword = section.Key("ha_engine_password").MustString("")