mount

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStats

type DeviceStats struct {
	Block bool

	AvailableBytes  int64
	TotalBytes      int64
	UsedBytes       int64
	AvailableInodes int64
	TotalInodes     int64
	UsedInodes      int64
}

type IMount

type IMount interface {
	Mounter() *mount.SafeFormatAndMount
	ScanForAttach(devicePath string) error
	GetDevicePath(volumeID string) (string, error)
	IsLikelyNotMountPointAttach(targetpath string) (bool, error)
	UnmountPath(mountPath string) error
	MakeFile(pathname string) error
	MakeDir(pathname string) error
	GetDeviceStats(path string) (*DeviceStats, error)
	GetMountFs(path string) ([]byte, error)
}
var MInstance IMount = nil

func GetMountProvider

func GetMountProvider() IMount

GetMountProvider returns instance of Mounter

type Mount

type Mount struct {
	BaseMounter *mount.SafeFormatAndMount
}

func (*Mount) GetDevicePath

func (m *Mount) GetDevicePath(volumeID string) (string, error)

GetDevicePath returns the path of an attached block storage volume, specified by its id.

func (*Mount) GetDeviceStats

func (m *Mount) GetDeviceStats(path string) (*DeviceStats, error)

func (*Mount) GetMountFs

func (m *Mount) GetMountFs(volumePath string) ([]byte, error)

func (*Mount) IsLikelyNotMountPointAttach

func (m *Mount) IsLikelyNotMountPointAttach(targetpath string) (bool, error)

IsLikelyNotMountPointAttach

func (*Mount) MakeDir

func (m *Mount) MakeDir(pathname string) error

MakeDir creates dir

func (*Mount) MakeFile

func (m *Mount) MakeFile(pathname string) error

MakeFile creates an empty file

func (*Mount) Mounter

func (m *Mount) Mounter() *mount.SafeFormatAndMount

Mounter returns instance of SafeFormatAndMount

func (*Mount) ScanForAttach

func (m *Mount) ScanForAttach(devicePath string) error

ScanForAttach

func (*Mount) UnmountPath

func (m *Mount) UnmountPath(mountPath string) error

UnmountPath

Jump to

Keyboard shortcuts

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