vpath

package
v3.0.0-beta13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

View Source
var (
	ErrAccess = errors.New("vol is not accessible")
)

Functions

func HostDevpath

func HostDevpath(ctx context.Context, s string, namespace string) (string, error)

HostDevpath returns host device path for a volume translation rules: INPUT VOL OUTPUT COMMENT /path /dev/sda1 loop dev /dev/sda1 /dev/sda1 host full path myvol myvol /dev/sda1 vol dev path in host

func HostDevpaths

func HostDevpaths(ctx context.Context, l []string, namespace string) ([]string, error)

HostDevpaths applies the HostDevpath function to each path of the input list

func HostPath

func HostPath(ctx context.Context, s string, namespace string) (string, error)

HostPath expand a volume-relative path to a host full path.

Example:

INPUT VOL OUTPUT COMMENT /path /path host full path myvol/path myvol /srv/myvol/path vol head relative path

func HostPathAndVol

func HostPathAndVol(ctx context.Context, s string, namespace string) (hostPath string, vol object.Vol, err error)

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

func HostPaths

func HostPaths(ctx context.Context, l []string, namespace string) ([]string, error)

HostPaths applies the HostPath function to each path of the input list

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL