heal: Add healing support for bucket, bucket metadata files. (#3252)

This patch implements healing in general but it is only used
as part of quickHeal().

Fixes #3237
This commit is contained in:
Harshavardhana
2016-11-16 16:42:23 -08:00
committed by GitHub
parent df8153859c
commit c91d3791f9
18 changed files with 700 additions and 217 deletions

View File

@@ -324,3 +324,23 @@ type NotImplemented struct{}
func (e NotImplemented) Error() string {
return "Not Implemented"
}
// Check if error type is ObjectNameInvalid.
func isErrObjectNameInvalid(err error) bool {
err = errorCause(err)
switch err.(type) {
case ObjectNameInvalid:
return true
}
return false
}
// Check if error type is ObjectNotFound.
func isErrObjectNotFound(err error) bool {
err = errorCause(err)
switch err.(type) {
case ObjectNotFound:
return true
}
return false
}