Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-sectorbuilder
Commits
d6ca00c7
Commit
d6ca00c7
authored
Sep 13, 2019
by
laser
Browse files
feat(labels): add human-readable labels for each member
parent
4d2aefad
Changes
2
Show whitespace changes
Inline
Side-by-side
sealed_sector_health/health.go
View file @
d6ca00c7
...
...
@@ -11,3 +11,15 @@ const (
ErrorInvalidLength
// sector exists, but length is incorrect
ErrorMissing
// sector no longer exists
)
var
labels
=
[
...
]
string
{
"Unknown"
,
"Ok"
,
"ErrorInvalidChecksum"
,
"ErrorInvalidLength"
,
"ErrorMissing"
,
}
func
(
el
Health
)
String
()
string
{
return
labels
[
el
]
}
sealing_state/state.go
View file @
d6ca00c7
...
...
@@ -10,3 +10,15 @@ const (
Sealing
// sector is currently being sealed
Sealed
// sector has been sealed successfully
)
var
labels
=
[
...
]
string
{
"Unknown"
,
"Pending"
,
"Failed"
,
"Sealing"
,
"Sealed"
,
}
func
(
el
State
)
String
()
string
{
return
labels
[
el
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment