open-vault/helper/consts/replication.go

21 lines
319 B
Go
Raw Normal View History

2017-02-16 18:37:21 +00:00
package consts
type ReplicationState uint32
const (
ReplicationDisabled ReplicationState = iota
ReplicationPrimary
ReplicationSecondary
)
func (r ReplicationState) String() string {
switch r {
case ReplicationSecondary:
return "secondary"
case ReplicationPrimary:
return "primary"
}
return "disabled"
}