mountmanager

package
v1.8.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCustomFakeSafeMounter added in v0.6.0

func NewCustomFakeSafeMounter(mounter mount.Interface, exec exec.Interface) *mount.SafeFormatAndMount

func NewDeviceUtils added in v0.2.0

func NewDeviceUtils() *deviceUtils

func NewFakeDeviceUtils added in v0.2.0

func NewFakeDeviceUtils() *fakeDeviceUtils

func NewFakeSafeBlockingMounter added in v0.6.0

func NewFakeSafeBlockingMounter(readyToExecute chan chan struct{}) *mount.SafeFormatAndMount

func NewFakeSafeMounter added in v0.2.0

func NewFakeSafeMounter() *mount.SafeFormatAndMount

func NewFakeSafeMounterWithCustomExec added in v0.6.0

func NewFakeSafeMounterWithCustomExec(exec exec.Interface) *mount.SafeFormatAndMount

func NewFakeStatter added in v0.7.0

func NewFakeStatter(mounter *mount.SafeFormatAndMount) *fakeStatter

func NewSafeMounter added in v0.2.0

func NewSafeMounter() (*mount.SafeFormatAndMount, error)

func NewStatter added in v0.7.0

func NewStatter(mounter *mount.SafeFormatAndMount) *realStatter

Types

type DeviceUtils added in v0.2.0

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, deviceName string) (string, error)

	// DisableDevice performs necessary disabling prior to a device being
	// detached from a node. The path is that from GetDiskByIdPaths.
	DisableDevice(devicePath string) error
}

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

type FakeBlockingMounter added in v0.6.0

type FakeBlockingMounter struct {
	*mount.FakeMounter
	ReadyToExecute chan chan struct{}
}

func (*FakeBlockingMounter) Mount added in v0.6.0

func (mounter *FakeBlockingMounter) Mount(source string, target string, fstype string, options []string) error

Mount is overridden and adds functionality to finely control the order of execution of FakeMounter's Mount calls. Upon starting a Mount, it passes a chan 'executeMount' into readyToExecute, then blocks on executeMount. The test calling this function can block on readyToExecute to ensure that the operation has started and allowed the Mount to continue by passing a struct into executeMount.

type Statter added in v0.7.0

type Statter interface {
	StatFS(path string) (int64, int64, int64, int64, int64, int64, error)
	IsBlockDevice(string) (bool, error)
}

Jump to

Keyboard shortcuts

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