health.go 553 Bytes
Newer Older
1
2
3
4
5
6
7
package sealed_sector_health

// Health represents the healthiness of a sector managed by a
// sector builder.
type Health int

const (
8
9
10
11
12
	Unknown         Health = iota
	Ok                     // everything is fine
	InvalidChecksum        // sector exists, but checksum is invalid
	InvalidLength          // sector exists, but length is incorrect
	Missing                // sector no longer exists
13
)
14
15
16
17

var labels = [...]string{
	"Unknown",
	"Ok",
18
19
20
	"InvalidChecksum",
	"InvalidLength",
	"Missing",
21
22
23
24
25
}

func (el Health) String() string {
	return labels[el]
}