mountmanager

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package mountmanager ...

Package mountmanager ...

Package mountmanager ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeSafeMounter

func NewFakeSafeMounter() *mount.SafeFormatAndMount

NewFakeSafeMounter ...

func NewFakeSafeMounterWithCustomActions added in v1.1.2

func NewFakeSafeMounterWithCustomActions(actionList []testingexec.FakeCommandAction) *mount.SafeFormatAndMount

Types

type FakeNodeMounter

type FakeNodeMounter struct {
	*mount.SafeFormatAndMount
}

FakeNodeMounter ...

func (*FakeNodeMounter) GetSafeFormatAndMount added in v1.1.2

func (f *FakeNodeMounter) GetSafeFormatAndMount() *mount.SafeFormatAndMount

GetSafeFormatAndMount returns the existing SafeFormatAndMount object of NodeMounter.

func (*FakeNodeMounter) IsLikelyNotMountPoint added in v1.1.9

func (f *FakeNodeMounter) IsLikelyNotMountPoint(file string) (bool, error)

IsLikelyNotMountPoint ...

func (*FakeNodeMounter) List added in v1.1.9

func (f *FakeNodeMounter) List() ([]mount.MountPoint, error)

List() ...

func (*FakeNodeMounter) MakeDir

func (f *FakeNodeMounter) MakeDir(pathname string) error

MakeDir ...

func (*FakeNodeMounter) MakeFile

func (f *FakeNodeMounter) MakeFile(pathname string) error

MakeFile ...

func (*FakeNodeMounter) Mount added in v1.1.10

func (f *FakeNodeMounter) Mount(source, target, _ string, _ []string) error

Mount

func (*FakeNodeMounter) PathExists

func (f *FakeNodeMounter) PathExists(pathname string) (bool, error)

PathExists ...

func (*FakeNodeMounter) Resize added in v1.1.2

func (f *FakeNodeMounter) Resize(devicePath string, deviceMountPath string) (bool, error)

Resize returns boolean and error if any

func (*FakeNodeMounter) Unmount added in v1.1.10

func (f *FakeNodeMounter) Unmount(target string) error

Unmount

type FakeNodeMounterWithCustomActions added in v1.1.2

type FakeNodeMounterWithCustomActions struct {
	*mount.SafeFormatAndMount
	// contains filtered or unexported fields
}

FakeNodeMounterWithCustomActions ...

func (*FakeNodeMounterWithCustomActions) GetSafeFormatAndMount added in v1.1.2

func (f *FakeNodeMounterWithCustomActions) GetSafeFormatAndMount() *mount.SafeFormatAndMount

NewSafeFormatAndMount ...

func (*FakeNodeMounterWithCustomActions) MakeDir added in v1.1.2

func (f *FakeNodeMounterWithCustomActions) MakeDir(pathname string) error

MakeDir ...

func (*FakeNodeMounterWithCustomActions) MakeFile added in v1.1.2

func (f *FakeNodeMounterWithCustomActions) MakeFile(pathname string) error

MakeFile ...

func (*FakeNodeMounterWithCustomActions) PathExists added in v1.1.2

func (f *FakeNodeMounterWithCustomActions) PathExists(pathname string) (bool, error)

PathExists ...

func (*FakeNodeMounterWithCustomActions) Resize added in v1.1.2

func (f *FakeNodeMounterWithCustomActions) Resize(devicePath string, deviceMountPath string) (bool, error)

Resize returns boolean and error if any

type Mounter

type Mounter interface {
	GetSafeFormatAndMount() *mount.SafeFormatAndMount
	MakeFile(path string) error
	MakeDir(path string) error
	PathExists(path string) (bool, error)
	Resize(string, string) (bool, error)
	List() ([]mount.MountPoint, error)
	IsLikelyNotMountPoint(file string) (bool, error)
	// contains filtered or unexported methods
}

Mounter is the interface implemented by Mounter

func NewFakeNodeMounter

func NewFakeNodeMounter() Mounter

NewFakeNodeMounter ...

func NewFakeNodeMounterWithCustomActions added in v1.1.2

func NewFakeNodeMounterWithCustomActions(actionList []testingexec.FakeCommandAction) Mounter

NewFakeNodeMounterWithCustomActions ...

func NewNodeMounter

func NewNodeMounter() Mounter

NewNodeMounter ...

type NodeMounter

type NodeMounter struct {
	*mount.SafeFormatAndMount
}

NodeMounter implements Mounter. A superstruct of SafeFormatAndMount.

func (*NodeMounter) GetSafeFormatAndMount added in v1.1.2

func (m *NodeMounter) GetSafeFormatAndMount() *mount.SafeFormatAndMount

GetSafeFormatAndMount returns the existing SafeFormatAndMount object of NodeMounter.

func (*NodeMounter) MakeDir

func (m *NodeMounter) MakeDir(path string) error

MakeDir creates a new directory.

func (*NodeMounter) MakeFile

func (m *NodeMounter) MakeFile(path string) error

MakeFile creates an empty file.

func (*NodeMounter) PathExists

func (m *NodeMounter) PathExists(path string) (bool, error)

PathExists returns true if the specified path exists.

func (*NodeMounter) Resize added in v1.1.2

func (m *NodeMounter) Resize(devicePath string, deviceMountPath string) (bool, error)

Resize returns boolean and error if any

Jump to

Keyboard shortcuts

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