1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-07 00:46:53 +01:00
Files
glusterd2/plugins/georeplication/struct.go
Aravinda VK c72adb6fdb Changed action string to enum
Updates: #271
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2017-11-23 12:40:51 +05:30

34 lines
498 B
Go

package georeplication
import "fmt"
type actionType uint16
const (
actionCreate actionType = iota
actionStart
actionStop
actionPause
actionResume
actionDelete
)
func (i actionType) String() string {
switch i {
case actionCreate:
return "create"
case actionStart:
return "start"
case actionStop:
return "stop"
case actionPause:
return "pause"
case actionResume:
return "resume"
case actionDelete:
return "delete"
default:
return fmt.Sprintf("actionType(%d)", i)
}
}