kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler.go

const losetupPath

const ErrDeviceNotFound

type BlockVolumePathHandler

// NewBlockVolumePathHandler returns a new instance of BlockVolumeHandler.
func NewBlockVolumePathHandler() BlockVolumePathHandler {}

type VolumePathHandler

// MapDevice creates a symbolic link to block device under specified map path
func (v VolumePathHandler) MapDevice(devicePath string, mapPath string, linkName string, bindMount bool) error {}

func mapBindMountDevice(v VolumePathHandler, devicePath string, mapPath string, linkName string) error {}

func mapSymlinkDevice(v VolumePathHandler, devicePath string, mapPath string, linkName string) error {}

// UnmapDevice removes a symbolic link associated to block device under specified map path
func (v VolumePathHandler) UnmapDevice(mapPath string, linkName string, bindMount bool) error {}

func unmapBindMountDevice(v VolumePathHandler, mapPath string, linkName string) error {}

func unmapSymlinkDevice(v VolumePathHandler, mapPath string, linkName string) error {}

// RemoveMapPath removes a file or directory on specified map path
func (v VolumePathHandler) RemoveMapPath(mapPath string) error {}

// IsSymlinkExist returns true if specified file exists and the type is symbolik link.
// If file doesn't exist, or file exists but not symbolic link, return false with no error.
// On other cases, return false with error from Lstat().
func (v VolumePathHandler) IsSymlinkExist(mapPath string) (bool, error) {}

// IsDeviceBindMountExist returns true if specified file exists and the type is device.
// If file doesn't exist, or file exists but not device, return false with no error.
// On other cases, return false with error from Lstat().
func (v VolumePathHandler) IsDeviceBindMountExist(mapPath string) (bool, error) {}

// GetDeviceBindMountRefs searches bind mounts under global map path
func (v VolumePathHandler) GetDeviceBindMountRefs(devPath string, mapPath string) ([]string, error) {}