[v9.2.x] Chore: Add encryption codec to the remote cache (#59871) (#59896)

* add encryption codec to the remote cache

* change config files too

* fix test constructor

* pass codec into the test cache

(cherry picked from commit f1fb202284)
This commit is contained in:
Serge Zaitsev
2022-12-06 17:09:24 +01:00
committed by GitHub
parent 8c15be99f5
commit 3c86bf550e
11 changed files with 87 additions and 31 deletions
+9 -6
View File
@@ -1073,11 +1073,13 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
dbName := valueAsString(cacheServer, "type", "database")
connStr := valueAsString(cacheServer, "connstr", "")
prefix := valueAsString(cacheServer, "prefix", "")
encryption := cacheServer.Key("encryption").MustBool(false)
cfg.RemoteCacheOptions = &RemoteCacheOptions{
Name: dbName,
ConnStr: connStr,
Prefix: prefix,
Name: dbName,
ConnStr: connStr,
Prefix: prefix,
Encryption: encryption,
}
geomapSection := iniFile.Section("geomap")
@@ -1111,9 +1113,10 @@ func valueAsString(section *ini.Section, keyName string, defaultValue string) st
}
type RemoteCacheOptions struct {
Name string
ConnStr string
Prefix string
Name string
ConnStr string
Prefix string
Encryption bool
}
func (cfg *Cfg) readLDAPConfig() {