mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-06 08:17:42 -05:00
Merge pull request #4180 from owncloud/fix-search-reva-addr-config
fix search reva addr config parsing
This commit is contained in:
@@ -19,7 +19,7 @@ type Config struct {
|
||||
GRPC GRPC `yaml:"grpc"`
|
||||
|
||||
Datapath string `yaml:"data_path" env:"SEARCH_DATA_PATH" desc:"Path for the search persistence directory."`
|
||||
Reva Reva `yaml:"reva"`
|
||||
Reva *Reva `yaml:"reva"`
|
||||
Events Events `yaml:"events"`
|
||||
|
||||
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;SEARCH_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."`
|
||||
|
||||
@@ -29,7 +29,7 @@ func DefaultConfig() *config.Config {
|
||||
Name: "search",
|
||||
},
|
||||
Datapath: path.Join(defaults.BaseDataPath(), "search"),
|
||||
Reva: config.Reva{
|
||||
Reva: &config.Reva{
|
||||
Address: "127.0.0.1:9142",
|
||||
},
|
||||
Events: config.Events{
|
||||
@@ -68,6 +68,14 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" {
|
||||
cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey
|
||||
}
|
||||
|
||||
if cfg.Reva == nil && cfg.Commons != nil && cfg.Commons.Reva != nil {
|
||||
cfg.Reva = &config.Reva{
|
||||
Address: cfg.Commons.Reva.Address,
|
||||
}
|
||||
} else if cfg.Reva == nil {
|
||||
cfg.Reva = &config.Reva{}
|
||||
}
|
||||
}
|
||||
|
||||
func Sanitize(cfg *config.Config) {
|
||||
|
||||
Reference in New Issue
Block a user