mount

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeMounter added in v1.18.0

func NewFakeMounter() *mount.FakeMounter

NewFakeMounter returns fake mounter instance

func NewFakeSafeFormatAndMounter added in v1.18.0

func NewFakeSafeFormatAndMounter() *mount.SafeFormatAndMount

NewFakeSafeFormatAndMounter returns base Fake mounter instance

Types

type DeviceStats added in v1.19.0

type DeviceStats struct {
	Block bool

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

type IMount added in v1.18.0

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

func GetMountProvider added in v1.18.0

func GetMountProvider() IMount

GetMountProvider returns instance of Mounter

type Mount added in v1.18.0

type Mount struct {
	BaseMounter *mount.SafeFormatAndMount
}

func (*Mount) GetDevicePath added in v1.18.0

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 added in v1.19.0

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

func (*Mount) GetMountFs added in v1.22.0

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

func (*Mount) IsLikelyNotMountPointAttach added in v1.18.0

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

IsLikelyNotMountPointAttach

func (*Mount) MakeDir added in v1.18.0

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

MakeDir creates dir

func (*Mount) MakeFile added in v1.18.0

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

MakeFile creates an empty file

func (*Mount) Mounter added in v1.19.0

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

Mounter returns instance of SafeFormatAndMount

func (*Mount) ScanForAttach added in v1.18.0

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

ScanForAttach

func (*Mount) UnmountPath added in v1.18.0

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

UnmountPath

type MountMock added in v1.18.0

type MountMock struct {
	mock.Mock
}

revive:disable:exported MountMock is an autogenerated mock type for the IMount type ORIGINALLY GENERATED BY mockery with hand edits

func (*MountMock) GetDevicePath added in v1.18.0

func (_m *MountMock) GetDevicePath(volumeID string) (string, error)

GetDevicePath provides a mock function with given fields: volumeID

func (*MountMock) GetDeviceStats added in v1.19.0

func (_m *MountMock) GetDeviceStats(path string) (*DeviceStats, error)

func (*MountMock) GetInstanceID added in v1.18.0

func (_m *MountMock) GetInstanceID() (string, error)

GetInstanceID provides a mock function with given fields:

func (*MountMock) GetMountFs added in v1.22.0

func (_m *MountMock) GetMountFs(pathname string) ([]byte, error)

func (*MountMock) IsLikelyNotMountPointAttach added in v1.18.0

func (_m *MountMock) IsLikelyNotMountPointAttach(targetpath string) (bool, error)

IsLikelyNotMountPointAttach provides a mock function with given fields: targetpath

func (*MountMock) MakeDir added in v1.18.0

func (_m *MountMock) MakeDir(pathname string) error

func (*MountMock) MakeFile added in v1.18.0

func (_m *MountMock) MakeFile(pathname string) error

MakeFile creates an empty file

func (*MountMock) Mounter added in v1.19.0

func (_m *MountMock) Mounter() *mount.SafeFormatAndMount

GetBaseMounter provides a mock function

func (*MountMock) ScanForAttach added in v1.18.0

func (_m *MountMock) ScanForAttach(devicePath string) error

ScanForAttach provides a mock function with given fields: devicePath

func (*MountMock) UnmountPath added in v1.18.0

func (_m *MountMock) UnmountPath(mountPath string) error

UnmountPath provides a mock function with given fields: mountPath

Jump to

Keyboard shortcuts

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