Documentation
¶
Overview ¶
Package utils provides common utils for connector
Package utils provides common utils for connector
Index ¶
- func BindMountRawBlockDevice(ctx context.Context, sourcePath, targetPath string, mountFlags []string) error
- func ContainSourceDevice(ctx context.Context, targetPath, sourceDev string) bool
- func GetMultiPathInfo(connectionProperties map[string]interface{}) (bool, string, error)
- func Mount(ctx context.Context, sourcePath, targetPath string, flags MountParam, ...) error
- func MountToDir(ctx context.Context, sourcePath, targetPath string, flags MountParam, ...) error
- func Unmount(ctx context.Context, targetPath string) error
- func VerifyMultipathService(requiredServices []string, forbiddenServices []string) error
- type MountParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindMountRawBlockDevice ¶
func BindMountRawBlockDevice(ctx context.Context, sourcePath, targetPath string, mountFlags []string) error
BindMountRawBlockDevice mounts the raw block device to target path
func ContainSourceDevice ¶
ContainSourceDevice used to check whether target path referenced source device is equal to sourceDev
func GetMultiPathInfo ¶
GetMultiPathInfo is used to obtain MultiPath configuration information.
func Mount ¶
func Mount(ctx context.Context, sourcePath, targetPath string, flags MountParam, checkSourcePath bool) error
Mount mounts source to target with given flags.
func MountToDir ¶
func MountToDir(ctx context.Context, sourcePath, targetPath string, flags MountParam, checkSourcePath bool) error
MountToDir mounts source to target which is a directory.
func VerifyMultipathService ¶
VerifyMultipathService is used to verify the installation and running status of the multipath service.
Types ¶
type MountParam ¶
MountParam is the parameters for mount
Click to show internal directories.
Click to hide internal directories.