mirror of
https://github.com/ceph/go-ceph
synced 2025-01-15 18:48:26 +00:00
rbd: add String method for MirrorMode
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
d75b75fb75
commit
406868763c
@ -31,6 +31,20 @@ const (
|
|||||||
MirrorModePool = MirrorMode(C.RBD_MIRROR_MODE_POOL)
|
MirrorModePool = MirrorMode(C.RBD_MIRROR_MODE_POOL)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// String representation of MirrorMode.
|
||||||
|
func (m MirrorMode) String() string {
|
||||||
|
switch m {
|
||||||
|
case MirrorModeDisabled:
|
||||||
|
return "disabled"
|
||||||
|
case MirrorModeImage:
|
||||||
|
return "image"
|
||||||
|
case MirrorModePool:
|
||||||
|
return "pool"
|
||||||
|
default:
|
||||||
|
return "<unknown>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ImageMirrorMode is used to indicate the mirroring approach for an RBD image.
|
// ImageMirrorMode is used to indicate the mirroring approach for an RBD image.
|
||||||
type ImageMirrorMode int64
|
type ImageMirrorMode int64
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user