Chore: Add encryption codec to the remote cache (#59871)

* add encryption codec to the remote cache

* change config files too

* fix test constructor

* pass codec into the test cache
This commit is contained in:
Serge Zaitsev
2022-12-06 15:12:27 +01:00
committed by GitHub
parent 2ff6ae65df
commit f1fb202284
11 changed files with 87 additions and 31 deletions
+9 -6
View File
@@ -1121,11 +1121,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")
@@ -1159,9 +1161,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() {