[10.4.x]: Live: Add ha_prefix (#93759) (#93927)

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
This commit is contained in:
Stephanie Hingtgen
2024-09-27 13:29:05 -05:00
committed by GitHub
co-authored by Todd Treece
parent fa58bd62bb
commit bee1c139cc
6 changed files with 47 additions and 9 deletions
+3
View File
@@ -428,6 +428,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
@@ -1984,6 +1986,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("")