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

Function readStoragePoolDriversCache

cmd/incusd/storage.go:35–47  ·  view source on GitHub ↗

readStoragePoolDriversCache returns supported and used storage driver info.

()

Source from the content-addressed store, hash-verified

33
34// readStoragePoolDriversCache returns supported and used storage driver info.
35func readStoragePoolDriversCache() ([]api.ServerStorageDriverInfo, map[string]string) {
36 usedDrivers, ok := storagePoolUsedDriversCacheVal.Load().(map[string]string)
37 if !ok {
38 usedDrivers = map[string]string{}
39 }
40
41 supportedDrivers, ok := storagePoolSupportedDriversCacheVal.Load().([]api.ServerStorageDriverInfo)
42 if !ok {
43 supportedDrivers = []api.ServerStorageDriverInfo{}
44 }
45
46 return supportedDrivers, usedDrivers
47}
48
49func storageStartup(s *state.State) error {
50 // Update the storage drivers supported and used cache in api_1.0.go.

Callers 1

api10GetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…