Documentation
¶
Overview ¶
Provides Filesystem Stats
Index ¶
- Constants
- type Context
- type DeviceInfo
- type DiskStats
- type Fs
- type FsInfo
- type RealFsInfo
- func (self *RealFsInfo) GetDeviceForLabel(label string) (string, error)
- func (self *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error)
- func (self *RealFsInfo) GetDirUsage(dir string) (uint64, error)
- func (self *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error)
- func (self *RealFsInfo) GetGlobalFsInfo() ([]Fs, error)
- func (self *RealFsInfo) GetLabelsForDevice(device string) ([]string, error)
- func (self *RealFsInfo) GetMountpointForDevice(dev string) (string, error)
Constants ¶
View Source
const ( LabelSystemRoot = "root" LabelDockerImages = "docker-images" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceInfo ¶
type Fs ¶
type Fs struct {
DeviceInfo
Capacity uint64
Free uint64
Available uint64
DiskStats DiskStats
}
type FsInfo ¶
type FsInfo interface {
// Returns capacity and free space, in bytes, of all the ext2, ext3, ext4 filesystems on the host.
GetGlobalFsInfo() ([]Fs, error)
// Returns capacity and free space, in bytes, of the set of mounts passed.
GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error)
// Returns number of bytes occupied by 'dir'.
GetDirUsage(dir string) (uint64, error)
// Returns the block device info of the filesystem on which 'dir' resides.
GetDirFsDevice(dir string) (*DeviceInfo, error)
// Returns the device name associated with a particular label.
GetDeviceForLabel(label string) (string, error)
// Returns all labels associated with a particular device name.
GetLabelsForDevice(device string) ([]string, error)
// Returns the mountpoint associated with a particular device.
GetMountpointForDevice(device string) (string, error)
}
type RealFsInfo ¶
type RealFsInfo struct {
// contains filtered or unexported fields
}
func (*RealFsInfo) GetDeviceForLabel ¶ added in v0.13.1
func (self *RealFsInfo) GetDeviceForLabel(label string) (string, error)
func (*RealFsInfo) GetDirFsDevice ¶
func (self *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error)
func (*RealFsInfo) GetDirUsage ¶
func (self *RealFsInfo) GetDirUsage(dir string) (uint64, error)
func (*RealFsInfo) GetFsInfoForPath ¶
func (self *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error)
func (*RealFsInfo) GetGlobalFsInfo ¶
func (self *RealFsInfo) GetGlobalFsInfo() ([]Fs, error)
func (*RealFsInfo) GetLabelsForDevice ¶ added in v0.13.1
func (self *RealFsInfo) GetLabelsForDevice(device string) ([]string, error)
func (*RealFsInfo) GetMountpointForDevice ¶ added in v0.13.1
func (self *RealFsInfo) GetMountpointForDevice(dev string) (string, error)
Click to show internal directories.
Click to hide internal directories.