Help us shape the future of Go! Take the 2026 Go Developer Survey

filesystem

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDiskUsage

func GetDiskUsage(ctx context.Context, timeout time.Duration, fsList []FilesystemType, _ *CheckConfig) error

func GetDiskUsageSingle added in v0.1.3

func GetDiskUsageSingle(ctx context.Context, timeout time.Duration, fs *FilesystemType)

func GetFilesystemsWithFixedNumberOfInodes

func GetFilesystemsWithFixedNumberOfInodes() []string

Types

type CheckConfig

type CheckConfig struct {
	// Thresholds
	WarningAbsolutThreshold  Thresholds
	CriticalAbsolutThreshold Thresholds

	WarningPercentThreshold  Thresholds
	CriticalPercentThreshold Thresholds

	WarningTotalCountOfFs  thresholds.ThresholdWrapper
	CriticalTotalCountOfFs thresholds.ThresholdWrapper

	Filters Filters

	ReadonlyOption  bool
	ReadWriteOption bool

	// Output Verbosity
	Verbosity uint
}

type DualThresholdWrapper

type DualThresholdWrapper struct {
	Free thresholds.ThresholdWrapper
	Used thresholds.ThresholdWrapper
}

type FilesystemType

type FilesystemType struct {
	PartStats  disk.PartitionStat
	UsageStats disk.UsageStat
	Error      error
}

FilesystemType describes the retrieved metadata of a filesystem nolint: revive

func FilterFileSystem

func FilterFileSystem(filesystems []FilesystemType, filters *Filters) ([]FilesystemType, error)

type Filters

type Filters struct {
	// Selection/File options
	//  Paths
	IncludeDevicePaths []string
	ExcludeDevicePaths []string

	//  Filesystem Types
	IncludeFsType []string
	ExcludeFsType []string

	// Mount Paths
	IncludeMountPaths []string
	ExcludeMountPaths []string
	// Filesystem Options
	//  Read-Only? Read-Write
	//  pass through general mount options?
	IncludeOptions []string
	ExcludeOptions []string
}

type Thresholds

type Thresholds struct {
	Space  DualThresholdWrapper
	Inodes DualThresholdWrapper
}

Jump to

Keyboard shortcuts

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