Documentation ¶
Index ¶
- func NewCmdMountsSearcher(runner boshsys.CmdRunner) cmdMountsSearcher
- func NewDiskUtil(diskPath string, mounter Mounter, fs boshsys.FileSystem, logger boshlog.Logger) boshdevutil.DeviceUtil
- func NewLinuxBindMounter(delegateMounter Mounter) linuxBindMounter
- func NewLinuxFormatter(runner boshsys.CmdRunner, fs boshsys.FileSystem) (formatter linuxFormatter)
- func NewLinuxMounter(runner boshsys.CmdRunner, mountsSearcher MountsSearcher, ...) (mounter linuxMounter)
- func NewProcMountsSearcher(fs boshsys.FileSystem) procMountsSearcher
- func NewRootDevicePartitioner(logger boshlog.Logger, cmdRunner boshsys.CmdRunner, deltaInBytes uint64) rootDevicePartitioner
- func NewSfdiskPartitioner(logger boshlog.Logger, cmdRunner boshsys.CmdRunner) (partitioner sfdiskPartitioner)
- type FileSystemType
- type Formatter
- type Manager
- type Mount
- type Mounter
- type MountsSearcher
- type Partition
- type PartitionType
- type Partitioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdMountsSearcher ¶
func NewDiskUtil ¶
func NewDiskUtil(diskPath string, mounter Mounter, fs boshsys.FileSystem, logger boshlog.Logger) boshdevutil.DeviceUtil
func NewLinuxBindMounter ¶
func NewLinuxBindMounter(delegateMounter Mounter) linuxBindMounter
func NewLinuxFormatter ¶
func NewLinuxFormatter(runner boshsys.CmdRunner, fs boshsys.FileSystem) (formatter linuxFormatter)
func NewLinuxMounter ¶
func NewLinuxMounter( runner boshsys.CmdRunner, mountsSearcher MountsSearcher, unmountRetrySleep time.Duration, ) (mounter linuxMounter)
func NewProcMountsSearcher ¶
func NewProcMountsSearcher(fs boshsys.FileSystem) procMountsSearcher
Types ¶
type FileSystemType ¶
type FileSystemType string
const ( FileSystemSwap FileSystemType = "swap" FileSystemExt4 FileSystemType = "ext4" )
type Formatter ¶
type Formatter interface {
Format(partitionPath string, fsType FileSystemType) (err error)
}
type Manager ¶
type Manager interface { GetPartitioner() Partitioner GetRootDevicePartitioner() Partitioner GetFormatter() Formatter GetMounter() Mounter GetMountsSearcher() MountsSearcher GetDiskUtil(diskPath string) boshdevutil.DeviceUtil }
func NewLinuxDiskManager ¶
type Mounter ¶
type Mounter interface { Mount(partitionPath, mountPoint string, mountOptions ...string) (err error) Unmount(partitionOrMountPoint string) (didUnmount bool, err error) RemountAsReadonly(mountPoint string) (err error) Remount(fromMountPoint, toMountPoint string, mountOptions ...string) (err error) SwapOn(partitionPath string) (err error) IsMountPoint(path string) (result bool, err error) IsMounted(devicePathOrMountPoint string) (result bool, err error) }
type MountsSearcher ¶
type Partition ¶
type Partition struct { SizeInBytes uint64 Type PartitionType }
type PartitionType ¶
type PartitionType string
const ( PartitionTypeSwap PartitionType = "swap" PartitionTypeLinux PartitionType = "linux" PartitionTypeEmpty PartitionType = "empty" )
Source Files ¶
- cmd_mounts_searcher.go
- delta.go
- diskutil.go
- formatter_interface.go
- linux_bind_mounter.go
- linux_disk_manager.go
- linux_formatter.go
- linux_mounter.go
- manager_interface.go
- mounter_interface.go
- mounts_searcher_interface.go
- partitioner_interface.go
- proc_mounts_searcher.go
- root_device_partitioner.go
- sfdisk_partitioner.go
Click to show internal directories.
Click to hide internal directories.