mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15457 from bergquist/distributed_cache
Distributed cache
This commit is contained in:
@@ -241,6 +241,9 @@ type Cfg struct {
|
||||
|
||||
// User
|
||||
EditorsCanOwn bool
|
||||
|
||||
// DistributedCache
|
||||
RemoteCacheOptions *RemoteCacheOptions
|
||||
}
|
||||
|
||||
type CommandLineArgs struct {
|
||||
@@ -781,9 +784,20 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
|
||||
enterprise := iniFile.Section("enterprise")
|
||||
cfg.EnterpriseLicensePath = enterprise.Key("license_path").MustString(filepath.Join(cfg.DataPath, "license.jwt"))
|
||||
|
||||
cacheServer := iniFile.Section("remote_cache")
|
||||
cfg.RemoteCacheOptions = &RemoteCacheOptions{
|
||||
Name: cacheServer.Key("type").MustString("database"),
|
||||
ConnStr: cacheServer.Key("connstr").MustString(""),
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type RemoteCacheOptions struct {
|
||||
Name string
|
||||
ConnStr string
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readSessionConfig() {
|
||||
sec := cfg.Raw.Section("session")
|
||||
SessionOptions = session.Options{}
|
||||
|
||||
Reference in New Issue
Block a user