filesystem

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package filesystem returns information about available filesystems.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrTimeoutExceeded represents a timeout error
	ErrTimeoutExceeded = errors.New("timeout exceeded")
)

Functions

This section is empty.

Types

type FileSystem

type FileSystem struct{}

FileSystem implements the Collector interface, providing information about mounted filesystems.

func (*FileSystem) Collect

func (fs *FileSystem) Collect() (interface{}, error)

Collect returns the list of mounted filesystems as an object which can be used to generate a JSON

func (*FileSystem) Name

func (fs *FileSystem) Name() string

Name returns the name of the package

type MountInfo added in v0.48.0

type MountInfo struct {
	// Name is the name of the mounted filesystem.
	Name string `json:"name"`
	// SizeKB is the size of the mounted filesystem in KB.
	SizeKB uint64 `json:"kb_size"`
	// MountedOn is the mount point path of the mounted filesystem.
	MountedOn string `json:"mounted_on"`
}

MountInfo represents a mounted filesystem.

func Get added in v0.48.0

func Get() ([]MountInfo, error)

Get returns the list of mounted filesystems

Jump to

Keyboard shortcuts

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