mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
fix: Prometheus metrics to re-use storage disks (#11647)
also re-use storage disks for all `mc admin server info` calls as well, implement a new LocalStorageInfo() API call at ObjectLayer to lookup local disks storageInfo also fixes bugs where there were double calls to StorageInfo()
This commit is contained in:
@@ -39,14 +39,17 @@ const (
|
||||
// Add your own backend.
|
||||
)
|
||||
|
||||
// ObjectLayerState - represents the status of the object layer
|
||||
type ObjectLayerState string
|
||||
// ItemState - represents the status of any item in offline,init,online state
|
||||
type ItemState string
|
||||
|
||||
const (
|
||||
// ObjectLayerInitializing indicates that the object layer is still in initialization phase
|
||||
ObjectLayerInitializing = ObjectLayerState("initializing")
|
||||
// ObjectLayerOnline indicates that the object layer is ready
|
||||
ObjectLayerOnline = ObjectLayerState("online")
|
||||
|
||||
// ItemOffline indicates that the item is offline
|
||||
ItemOffline = ItemState("offline")
|
||||
// ItemInitializing indicates that the item is still in initialization phase
|
||||
ItemInitializing = ItemState("initializing")
|
||||
// ItemOnline indicates that the item is online
|
||||
ItemOnline = ItemState("online")
|
||||
)
|
||||
|
||||
// StorageInfo - represents total capacity of underlying storage.
|
||||
@@ -171,7 +174,7 @@ func (adm *AdminClient) DataUsageInfo(ctx context.Context) (DataUsageInfo, error
|
||||
|
||||
// InfoMessage container to hold server admin related information.
|
||||
type InfoMessage struct {
|
||||
Mode ObjectLayerState `json:"mode,omitempty"`
|
||||
Mode string `json:"mode,omitempty"`
|
||||
Domain []string `json:"domain,omitempty"`
|
||||
Region string `json:"region,omitempty"`
|
||||
SQSARN []string `json:"sqsARN,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user