readStoragePoolDriversCache returns supported and used storage driver info.
()
| 33 | |
| 34 | // readStoragePoolDriversCache returns supported and used storage driver info. |
| 35 | func 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 | |
| 49 | func storageStartup(s *state.State) error { |
| 50 | // Update the storage drivers supported and used cache in api_1.0.go. |
no outgoing calls
no test coverage detected
searching dependent graphs…