mounter

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeMounter

func NewSafeMounter() (*mount.SafeFormatAndMount, error)

Types

type CSIProxyMounter

type CSIProxyMounter struct {
	FsClient     *fsclientv1alpha1.Client
	DiskClient   *diskclientv1alpha1.Client
	VolumeClient *volumeclientv1alpha1.Client
}

func NewCSIProxyMounter added in v0.7.0

func NewCSIProxyMounter() (*CSIProxyMounter, error)

NewCSIProxyMounter - creates a new CSI Proxy mounter struct which encompassed all the clients to the CSI proxy - filesystem, disk and volume clients.

func (*CSIProxyMounter) DeviceOpened

func (mounter *CSIProxyMounter) DeviceOpened(pathname string) (bool, error)
func (mounter *CSIProxyMounter) EvalHostSymlinks(pathname string) (string, error)

func (*CSIProxyMounter) ExistsPath

func (mounter *CSIProxyMounter) ExistsPath(path string) (bool, error)

ExistsPath - Checks if a path exists. Unlike util ExistsPath, this call does not perform follow link.

func (*CSIProxyMounter) FindDiskByLun added in v0.7.0

func (mounter *CSIProxyMounter) FindDiskByLun(lun string) (diskNum string, err error)

FindDiskByLun - given a lun number, find out the corresponding disk

func (*CSIProxyMounter) FormatAndMount added in v0.7.0

func (mounter *CSIProxyMounter) FormatAndMount(source string, target string, fstype string, options []string) error

FormatAndMount - accepts the source disk number, target path to mount, the fstype to format with and options to be used.

func (*CSIProxyMounter) GetDeviceNameFromMount

func (mounter *CSIProxyMounter) GetDeviceNameFromMount(mountPath, pluginMountDir string) (string, error)

func (*CSIProxyMounter) GetFSGroup

func (mounter *CSIProxyMounter) GetFSGroup(pathname string) (int64, error)

func (*CSIProxyMounter) GetFileType

func (mounter *CSIProxyMounter) GetFileType(pathname string) (mount.FileType, error)

func (*CSIProxyMounter) GetMode

func (mounter *CSIProxyMounter) GetMode(pathname string) (os.FileMode, error)

func (*CSIProxyMounter) GetMountRefs

func (mounter *CSIProxyMounter) GetMountRefs(pathname string) ([]string, error)

func (*CSIProxyMounter) GetSELinuxSupport

func (mounter *CSIProxyMounter) GetSELinuxSupport(pathname string) (bool, error)

func (*CSIProxyMounter) IsLikelyNotMountPoint

func (mounter *CSIProxyMounter) IsLikelyNotMountPoint(path string) (bool, error)

IsLikelyMountPoint - If the directory does not exists, the function will return os.ErrNotExist error.

If the path exists, call to CSI proxy will check if its a link, if its a link then existence of target
path is checked.

func (*CSIProxyMounter) IsMountPointMatch

func (mounter *CSIProxyMounter) IsMountPointMatch(mp mount.MountPoint, dir string) bool

func (*CSIProxyMounter) List

func (mounter *CSIProxyMounter) List() ([]mount.MountPoint, error)

func (*CSIProxyMounter) MakeDir

func (mounter *CSIProxyMounter) MakeDir(pathname string) error

MakeDir - Creates a directory. The CSI proxy takes in context information. Currently the make dir is only used from the staging code path, hence we call it with Plugin context..

func (*CSIProxyMounter) MakeFile

func (mounter *CSIProxyMounter) MakeFile(pathname string) error

func (*CSIProxyMounter) MakeRShared

func (mounter *CSIProxyMounter) MakeRShared(path string) error

func (*CSIProxyMounter) Mount

func (mounter *CSIProxyMounter) Mount(source string, target string, fstype string, options []string) error

Mount just creates a soft link at target pointing to source.

func (*CSIProxyMounter) PathIsDevice

func (mounter *CSIProxyMounter) PathIsDevice(pathname string) (bool, error)

func (*CSIProxyMounter) Rescan added in v0.7.0

func (mounter *CSIProxyMounter) Rescan() error

Rescan would trigger an update storage cache via the CSI proxy.

func (*CSIProxyMounter) Rmdir added in v0.7.0

func (mounter *CSIProxyMounter) Rmdir(path string) error

Rmdir - delete the given directory TODO: Call separate rmdir for pod context and plugin context. v1alpha1 for CSI

proxy does a relaxed check for prefix as c:\var\lib\kubelet, so we can do
rmdir with either pod or plugin context.

func (*CSIProxyMounter) Unmount

func (mounter *CSIProxyMounter) Unmount(target string) error

Unmount - Removes the directory - equivalent to unmount on Linux.

Jump to

Keyboard shortcuts

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