Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceNumber ¶
DeviceNumber captures major:minor
type GetMountsRequest ¶
type GetMountsRequest struct { DriverName string // ceph, nfs FsType string // nfs4, ext4 KernelDriver string // rbd, device-mapper, etc. }
GetMountsRequest captures all the params required for scanning mountinfo
type MountInfo ¶
type MountInfo struct { MountID uint // unique mount ID ParentID uint // ID of the parent mount DeviceNumber *DeviceNumber // Major:Minor device numbers Root string // path of the directory in the filesystem which is the Root of this mount MountPoint string // path of the mount point MountOptions string // per mount options OptionalFields string // in the form of key:value Separator string // end of optional fields FilesystemType string // e.g ext3, ext4 MountSource string SuperOptions string // XXX This field is *not* parsed because it is not present on all systems. It is here as a placeholder. }
MountInfo captures the mount info read from /proc/self/mountinfo
func GetMounts ¶
func GetMounts(request *GetMountsRequest) ([]*MountInfo, error)
GetMounts captures the list of mounts that satisfies the given criteria (ceph/nfs/..)
Click to show internal directories.
Click to hide internal directories.