mount

package
v0.0.0-...-e7d1ed3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBlockDeviceSize

func GetBlockDeviceSize(path string) (int64, error)

func IsBlockDevice

func IsBlockDevice(path string) (bool, error)

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 {
	mountutil.Interface

	NodeFormatAndMount(devicePath string, targetPath string, fsType string, mountOptions []string) error
	MakeFile(path string) error
	MakeDir(path string) error
	GetFsMount(path string) ([]byte, error)
	GetBlockSizeBytes(path string) (int64, error)
	UnmountPath(path string) error
	NewResizeFs() *mountutil.ResizeFs
	GetDeviceStats(path string) (*DeviceStats, error)
}

func NewNodeMount

func NewNodeMount() IMount

type NodeMount

type NodeMount struct {
	*mountutil.SafeFormatAndMount
}

func (*NodeMount) GetBlockSizeBytes

func (n *NodeMount) GetBlockSizeBytes(path string) (int64, error)

func (*NodeMount) GetDeviceStats

func (n *NodeMount) GetDeviceStats(path string) (*DeviceStats, error)

func (*NodeMount) GetFsMount

func (n *NodeMount) GetFsMount(path string) ([]byte, error)

func (*NodeMount) MakeDir

func (n *NodeMount) MakeDir(path string) error

func (*NodeMount) MakeFile

func (n *NodeMount) MakeFile(path string) error

func (*NodeMount) NewResizeFs

func (n *NodeMount) NewResizeFs() *mountutil.ResizeFs

func (*NodeMount) NodeFormatAndMount

func (n *NodeMount) NodeFormatAndMount(devicePath string, targetPath string, fsType string, mountOptions []string) error

func (*NodeMount) UnmountPath

func (n *NodeMount) UnmountPath(path string) error

Jump to

Keyboard shortcuts

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