MCPcopy Index your code
hub / github.com/apecloud/kubeblocks / LoadConfig

Function LoadConfig

pkg/unstructured/config_object.go:59–68  ·  view source on GitHub ↗
(name string, content string, format parametersv1alpha1.CfgFileFormat)

Source from the content-addressed store, hash-verified

57}
58
59func LoadConfig(name string, content string, format parametersv1alpha1.CfgFileFormat) (ConfigObject, error) {
60 configObject, err := CfgObjectRegistry().GetConfigObject(name, format)
61 if err != nil {
62 return nil, err
63 }
64 if err := configObject.Unmarshal(content); err != nil {
65 return nil, err
66 }
67 return configObject, nil
68}

Callers 15

FromConfigObjectFunction · 0.92
initFunction · 0.92
TestRedisConfigFunction · 0.85
TestRedisConfig_MarshalFunction · 0.85
TestIniFormatFunction · 0.85
TestPropertiesFormat1Function · 0.85
TestJSONFormatFunction · 0.85
TestTomlFormatFunction · 0.85
TestXMLFormatFunction · 0.85
TestEmptyXMLFormatFunction · 0.85

Calls 3

CfgObjectRegistryFunction · 0.85
GetConfigObjectMethod · 0.80
UnmarshalMethod · 0.65

Tested by 13

TestRedisConfigFunction · 0.68
TestRedisConfig_MarshalFunction · 0.68
TestIniFormatFunction · 0.68
TestPropertiesFormat1Function · 0.68
TestJSONFormatFunction · 0.68
TestTomlFormatFunction · 0.68
TestXMLFormatFunction · 0.68
TestEmptyXMLFormatFunction · 0.68
TestYAMLFormatFunction · 0.68
TestYAMLFormatForBadCaseFunction · 0.68
TestPropertiesFormatFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…