mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
Except Bricks list(Currently shows as NODEID:BRICKPATH), all other fields output matches with existing Gluster CLI output Signed-off-by: Aravinda VK <avishwan@redhat.com>
28 lines
626 B
Go
28 lines
626 B
Go
package api
|
|
|
|
// VolState is the current state of the volume.
|
|
//go:generate jsonenums -type=VolState
|
|
type VolState uint16
|
|
|
|
const (
|
|
// VolCreated represents a volume that has been just created and never started.
|
|
VolCreated VolState = iota
|
|
// VolStarted represents a volume in started state.
|
|
VolStarted
|
|
// VolStopped represents a volume in stopped state (excluding newly created but never started volumes).
|
|
VolStopped
|
|
)
|
|
|
|
func (s VolState) String() string {
|
|
switch s {
|
|
case VolCreated:
|
|
return "Created"
|
|
case VolStarted:
|
|
return "Started"
|
|
case VolStopped:
|
|
return "Stopped"
|
|
default:
|
|
return "invalid VolState"
|
|
}
|
|
}
|