mount

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mount provides utilities to detect, format and mount storage devices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	mount.Interface

	FormatAndMount(source string, target string, fstype string, options []string) error
	GetBlockSizeBytes(devicePath string) (int64, error)
	GetDevicePath(ctx context.Context, volumeID string) (string, error)
	GetDeviceName(mountPath string) (string, int, error)
	GetStatistics(volumePath string) (volumeStatistics, error)
	IsBlockDevice(devicePath string) (bool, error)
	IsCorruptedMnt(err error) bool
	MakeDir(pathname string) error
	MakeFile(pathname string) error
	NeedResize(devicePath string, deviceMountPath string) (bool, error)
	PathExists(path string) (bool, error)
	Resize(devicePath, deviceMountPath string) (bool, error)
	Unpublish(path string) error
	Unstage(path string) error
}

Interface defines the set of methods to allow for mount operations on a system.

func New

func New() Interface

New creates an implementation of the mount.Interface.

func NewFake

func NewFake() Interface

NewFake creates a fake implementation of the mount.Interface, to be used in tests.

Jump to

Keyboard shortcuts

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