mounter

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeMounter

func NewSafeMounter(ctx context.Context) (*mount.SafeFormatAndMount, error)

NewSafeMounter returns mounter with exec

Types

type CSIProxyMounter

type CSIProxyMounter interface {
	mount.Interface
	// ExistsPath - Checks if a path exists. This call does not perform follow link.
	ExistsPath(ctx context.Context, path string) (bool, error)
	// FormatAndMount - accepts the source disk number, target path to mount, the fstype to format with and options to be used.
	FormatAndMount(ctx context.Context, source, target, fstype string, options []string) error
	// Rmdir - delete the given directory
	Rmdir(ctx context.Context, path string) error
	// MakeDir - Creates a directory.
	MakeDir(ctx context.Context, pathname string) error
	// Rescan would trigger an update storage cache via the CSI proxy.
	Rescan(ctx context.Context) error
	// GetDeviceNameFromMount returns the volume ID for a mount path.
	GetDeviceNameFromMount(ctx context.Context, mountPath string) (string, error)
	// Get the size in bytes for Volume
	GetVolumeSizeInBytes(ctx context.Context, devicePath string) (int64, error)
	// ResizeVolume resizes the volume to the maximum available size.
	ResizeVolume(ctx context.Context, devicePath string, sizeInBytes int64) error
	// GetAPIVersions returns the versions of the client APIs this mounter is using.
	GetAPIVersions() string
	// Gets windows specific disk number from diskId
	GetDiskNumber(ctx context.Context, diskID string) (string, error)
	// Get the size of the disk in bytes
	GetDiskTotalBytes(ctx context.Context, devicePath string) (int64, error)
	// StatFS returns info about volume
	StatFS(ctx context.Context, path string) (available, capacity, used, inodesFree, inodes, inodesUsed int64, err error)
	// GetBIOSSerialNumber - Get bios serial number
	GetBIOSSerialNumber(ctx context.Context) (string, error)
}

CSIProxyMounter extends the mount.Interface interface with CSI Proxy methods. In future this functions are supposed to be implemented in mount.Interface for windows

Jump to

Keyboard shortcuts

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