utils

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProcPath is a vfs storing process info for Linux.
	ProcPath = "/proc"
	// HostProcPath is the convention path where host `/proc` is mounted.
	HostProcPath = "/host/proc"
	// DiskRemoveTag indicates a Longhorn is pending to remove.
	DiskRemoveTag = "harvester-ndm-disk-remove"
)

Variables

This section is empty.

Functions

func CallerWithCondLock

func CallerWithCondLock[T any](cond *sync.Cond, f func() T) T

CallerWithLock is a helper function to call a function with a condition lock

func ContainsIgnoredCase

func ContainsIgnoredCase(s []string, k string) bool

func GetFullDevPath

func GetFullDevPath(shortPath string) string

func IsFSCorrupted

func IsFSCorrupted(err error) bool

func IsHostProcMounted

func IsHostProcMounted() (bool, error)

IsHostProcMounted checks if host's proc info `/proc` is mounted on `/host/proc`

func IsSupportedFileSystem

func IsSupportedFileSystem(fsType string) bool

func MakeExt4DiskFormatting

func MakeExt4DiskFormatting(devPath, uuid string) error

func MatchesIgnoredCase

func MatchesIgnoredCase(s []string, k string) bool

func MountDisk

func MountDisk(devPath, mountPoint string) error

MountDisk mounts the specified ext4 volume device to the specified path

func UmountDisk

func UmountDisk(path string) error

UmountDisk unmounts the specified volume device to the specified path

Types

This section is empty.

Jump to

Keyboard shortcuts

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