mountmanager

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeviceUtils

func NewDeviceUtils() *deviceUtils

func NewSafeMounter

func NewSafeMounter() *mount.SafeFormatAndMount

Types

type DeviceUtils

type DeviceUtils interface {
	// GetDiskByIdPaths returns a list of all possible paths for a
	// given Persistent Disk
	GetDiskByIdPaths(deviceName string, partition string) []string

	// VerifyDevicePath returns the first of the list of device paths that
	// exists on the machine, or an empty string if none exists
	VerifyDevicePath(devicePaths []string) (string, error)
}

DeviceUtils are a collection of methods that act on the devices attached to a Linode Instance

type FileInterface added in v0.8.4

type FileInterface interface {
	Close() error
}

type FileSystem added in v0.8.4

type FileSystem interface {
	IsNotExist(err error) bool
	MkdirAll(path string, perm os.FileMode) error
	Stat(name string) (fs.FileInfo, error)
	Remove(path string) error
	OpenFile(name string, flag int, perm os.FileMode) (FileInterface, error)
}

FileSystem defines the methods for file system operations.

func NewFileSystem added in v0.8.4

func NewFileSystem() FileSystem

type OSFileSystem added in v0.8.4

type OSFileSystem struct{}

OSFileSystem implements FileSystemInterface using the os package.

func (OSFileSystem) IsNotExist added in v0.8.4

func (OSFileSystem) IsNotExist(err error) bool

func (OSFileSystem) MkdirAll added in v0.8.4

func (OSFileSystem) MkdirAll(path string, perm os.FileMode) error

func (OSFileSystem) OpenFile added in v0.8.4

func (OSFileSystem) OpenFile(name string, flag int, perm os.FileMode) (FileInterface, error)

func (OSFileSystem) Remove added in v0.8.4

func (OSFileSystem) Remove(path string) error

func (OSFileSystem) Stat added in v0.8.4

func (OSFileSystem) Stat(name string) (fs.FileInfo, error)

Jump to

Keyboard shortcuts

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