mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-06 15:46:00 +01:00
18 lines
413 B
Go
18 lines
413 B
Go
package utils
|
|
|
|
import (
|
|
"path"
|
|
|
|
config "github.com/spf13/viper"
|
|
)
|
|
|
|
// GetVolumeDir returns path to volume directory
|
|
func GetVolumeDir(volumeName string) string {
|
|
return path.Join(config.GetString("localstatedir"), "vols", volumeName)
|
|
}
|
|
|
|
// GetSnapshotDir returns path to snapshot directory
|
|
func GetSnapshotDir(snapName string) string {
|
|
return path.Join(config.GetString("localstatedir"), "snaps", snapName)
|
|
}
|