in config/config_map_builder.go [62:88]
func (b *configMapBuilder) Build() (ConfigMap, error) {
configJsonMap, err := readConfig(b.configJsonPath, fromConfigJson)
if err != nil {
return ConfigMap{}, err
}
opsRootMap, err := readConfig(b.opsRootPath, fromOpsRoot)
if err != nil {
return ConfigMap{}, err
}
pluginOpsRootConfigs := make(map[string]map[string]interface{}, 0)
for plgName, opsRootPath := range b.pluginOpsRoots {
pluginOpsRootMap, err := readConfig(opsRootPath, fromOpsRoot)
if err != nil {
return ConfigMap{}, err
}
pluginOpsRootConfigs[plgName] = pluginOpsRootMap
}
return ConfigMap{
pluginOpsRootConfigs: pluginOpsRootConfigs,
opsRootConfig: opsRootMap,
config: configJsonMap,
configPath: b.configJsonPath,
}, nil
}