Documentation ¶
Overview ¶
Package vpath is a helper package easing the expansion of a virtual path like vol1/etc/nginx.conf to a host path like /srv/svc1data.ns1.vol.clu1/etc/nginx.conf
Index ¶
- Variables
- func HostDevpath(s string, namespace string) (string, error)
- func HostDevpaths(l []string, namespace string) ([]string, error)
- func HostPath(s string, namespace string) (string, error)
- func HostPathAndVol(s string, namespace string) (hostPath string, vol object.Vol, err error)
- func HostPaths(l []string, namespace string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrAccess = errors.New("vol is not accessible")
)
Functions ¶
func HostDevpath ¶
HostDevpath returns host device path for a volume translation rules: INPUT VOL OUPUT COMMENT /path /dev/sda1 loop dev /dev/sda1 /dev/sda1 host full path myvol myvol /dev/sda1 vol dev path in host
func HostDevpaths ¶
HostDevpaths applies the HostDevpath function to each path of the input list
func HostPath ¶
HostPath expand a volume-relative path to a host full path.
Example:
INPUT VOL OUPUT COMMENT /path /path host full path myvol/path myvol /srv/myvol/path vol head relative path
func HostPathAndVol ¶
HostPathAndVol expand a volume-relative path to a host full path. It returns the host full path and the associated object volume if defined.
Example:
INPUT VOL host path COMMENT /path nil /path host full path myvol/path myvol /srv/myvol/path vol head relative path
Types ¶
This section is empty.