mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
heal: Refactor heal command. (#2901)
- return errors for heal operation through rpc replies. - implement rotating wheel for healing status. Fixes #2491
This commit is contained in:
13
cmd/utils.go
13
cmd/utils.go
@@ -163,6 +163,19 @@ func contains(stringList []string, element string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// urlPathSplit - split url path into bucket and object components.
|
||||
func urlPathSplit(urlPath string) (bucketName, prefixName string) {
|
||||
if urlPath == "" {
|
||||
return urlPath, ""
|
||||
}
|
||||
urlPath = strings.TrimPrefix(urlPath, "/")
|
||||
i := strings.Index(urlPath, "/")
|
||||
if i != -1 {
|
||||
return urlPath[:i], urlPath[i+1:]
|
||||
}
|
||||
return urlPath, ""
|
||||
}
|
||||
|
||||
// Starts a profiler returns nil if profiler is not enabled, caller needs to handle this.
|
||||
func startProfiler(profiler string) interface {
|
||||
Stop()
|
||||
|
||||
Reference in New Issue
Block a user