fix: re-implement cluster healthcheck (#10101)

This commit is contained in:
Harshavardhana
2020-07-20 18:31:22 -07:00
committed by GitHub
parent 0c4be55936
commit ec06089eda
14 changed files with 107 additions and 71 deletions

View File

@@ -1557,11 +1557,12 @@ func (fs *FSObjects) IsTaggingSupported() bool {
return true
}
// IsReady - Check if the backend disk is ready to accept traffic.
func (fs *FSObjects) IsReady(_ context.Context) bool {
// Health returns health of the object layer
func (fs *FSObjects) Health(ctx context.Context, opts HealthOptions) HealthResult {
if _, err := os.Stat(fs.fsPath); err != nil {
return false
return HealthResult{}
}
return HealthResult{
Healthy: newObjectLayerFn() != nil,
}
return newObjectLayerFn() != nil
}