read-health check endpoint returns success if cluster can serve read requests (#11310)
This commit is contained in:
@@ -1623,3 +1623,9 @@ func (fs *FSObjects) Health(ctx context.Context, opts HealthOptions) HealthResul
|
||||
Healthy: newObjectLayerFn() != nil,
|
||||
}
|
||||
}
|
||||
|
||||
// ReadHealth returns "read" health of the object layer
|
||||
func (fs *FSObjects) ReadHealth(ctx context.Context) bool {
|
||||
_, err := os.Stat(fs.fsPath)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user