MCPcopy
hub / github.com/lxc/incus / Load

Function Load

internal/server/config/map.go:30–38  ·  view source on GitHub ↗

Load creates a new configuration Map with the given schema and initial values. It is meant to be called with a set of initial values that were set at a previous time and persisted to some storage like a database. If one or more keys fail to be loaded, return an ErrorList describing what went wrong.

(schema Schema, values map[string]string)

Source from the content-addressed store, hash-verified

28// If one or more keys fail to be loaded, return an ErrorList describing what
29// went wrong. Non-failing keys are still loaded in the returned Map.
30func Load(schema Schema, values map[string]string) (Map, error) {
31 m := Map{
32 schema: schema,
33 }
34
35 // Populate the initial values.
36 _, err := m.update(values)
37 return m, err
38}
39
40// Change the values of this configuration Map.
41//

Callers 12

TestLoadFunction · 0.92
TestLoad_ErrorFunction · 0.92
TestChangeFunction · 0.92
TestMap_ChangeErrorFunction · 0.92
TestMap_DumpFunction · 0.92
TestMap_GettersFunction · 0.92
TestMap_GettersPanicFunction · 0.92
SafeLoadFunction · 0.70
LoadByProjectAndNameFunction · 0.50
LoadNodeAllFunction · 0.50
LoadFromBackupFunction · 0.50

Calls 1

updateMethod · 0.95

Tested by 8

TestLoadFunction · 0.74
TestLoad_ErrorFunction · 0.74
TestChangeFunction · 0.74
TestMap_ChangeErrorFunction · 0.74
TestMap_DumpFunction · 0.74
TestMap_GettersFunction · 0.74
TestMap_GettersPanicFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…