re-implement StorageInfo to be a peer call (#16155)

This commit is contained in:
Harshavardhana
2022-12-01 14:31:35 -08:00
committed by GitHub
parent c84e2939e4
commit 5a8df7efb3
20 changed files with 191 additions and 128 deletions

View File

@@ -37,11 +37,6 @@ func getFormatStr(strLen int, padding int) string {
return "%" + formatStr
}
func mustGetStorageInfo(objAPI ObjectLayer) StorageInfo {
storageInfo, _ := objAPI.StorageInfo(GlobalContext)
return storageInfo
}
// Prints the formatted startup message.
func printStartupMessage(apiEndpoints []string, err error) {
logger.Info(color.Bold("MinIO Object Storage Server"))
@@ -67,7 +62,7 @@ func printStartupMessage(apiEndpoints []string, err error) {
// Object layer is initialized then print StorageInfo.
objAPI := newObjectLayerFn()
if objAPI != nil {
printStorageInfo(mustGetStorageInfo(objAPI))
printStorageInfo(objAPI.StorageInfo(GlobalContext))
}
// Prints credential, region and browser access.