Skip to content

Commit

Permalink
admin: Export HealStatus data type (minio#3930)
Browse files Browse the repository at this point in the history
`healStatus` can be returned to the API caller. This commit will help
developers to declare a variable with HealStatus type.
  • Loading branch information
vadmeste authored and harshavardhana committed Mar 18, 2017
1 parent 2463ae2 commit 3a6111e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/madmin/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ List ongoing multipart uploads that need healing.
|---|---|---|
|`ui.Key` | _string_ | Name of the object being uploaded |
|`ui.UploadID` | _string_ | UploadID of the ongoing multipart upload |
|`ui.HealUploadInfo.Status` | _healStatus_| One of `Healthy`, `CanHeal`, `Corrupted`, `QuorumUnavailable`|
|`ui.HealUploadInfo.Status` | _HealStatus_| One of `Healthy`, `CanHeal`, `Corrupted`, `QuorumUnavailable`|
|`ui.Err`| _error_ | non-nil if fetching fetching healing information failed |

__Example__
Expand Down
8 changes: 4 additions & 4 deletions pkg/madmin/heal-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ type ListBucketsHealResponse struct {
}

// HealStatus - represents different states of healing an object could be in.
type healStatus int
type HealStatus int

const (
// Healthy - Object that is already healthy
Healthy healStatus = iota
Healthy HealStatus = iota
// CanHeal - Object can be healed
CanHeal
// Corrupted - Object can't be healed
Expand All @@ -110,7 +110,7 @@ const (

// HealBucketInfo - represents healing related information of a bucket.
type HealBucketInfo struct {
Status healStatus
Status HealStatus
}

// BucketInfo - represents bucket metadata.
Expand All @@ -127,7 +127,7 @@ type BucketInfo struct {

// HealObjectInfo - represents healing related information of an object.
type HealObjectInfo struct {
Status healStatus
Status HealStatus
MissingDataCount int
MissingPartityCount int
}
Expand Down

0 comments on commit 3a6111e

Please sign in to comment.