Documentation ¶
Index ¶
- Variables
- type DeviceMap
- type DeviceMounter
- type Info
- type Manager
- type MountType
- type Mounter
- func (m *Mounter) Exists(devPath string, path string) (bool, error)
- func (m *Mounter) HasMounts(devPath string) int
- func (m *Mounter) Inspect(devPath string) []PathInfo
- func (m *Mounter) Mount(minor int, device, path, fs string, flags uintptr, data string) error
- func (m *Mounter) String() string
- func (m *Mounter) Unmount(device, path string) error
- type NFSMounter
- type PathInfo
- type PathMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrExist is returned if path is already mounted to a different device. ErrExist = errors.New("Mountpath already exists") // ErrEnoent is returned for a non existent mount point ErrEnoent = errors.New("Mountpath is not mounted") // ErrEinval is returned is fields for an entry do no match // existing fields ErrEinval = errors.New("Invalid arguments for mount entry") // ErrUnsupported is returned for an operation or a mount type not suppored. ErrUnsupported = errors.New("Not supported") )
Functions ¶
This section is empty.
Types ¶
type DeviceMounter ¶
type DeviceMounter struct {
Mounter
}
DeviceMounter implements Ops and keeps track of active mounts for volume drivers.
func NewDeviceMounter ¶
func NewDeviceMounter(devPrefix string) (*DeviceMounter, error)
NewDeviceMounter
type Manager ¶
type Manager interface { // String representation of the mount table String() string // Load mount table for all devices that match this identifier Load(source string) error // Inspect mount table for specified source. ErrEnoent may be returned. Inspect(source string) []PathInfo // HasMounts determines returns the number of mounts for the source. HasMounts(source string) int // Exists returns true if the device is mounted at specified path. // returned if the device does not exists. Exists(source, path string) (bool, error) // Mount device at mountpoint or increment refcnt if device is already mounted // at specified mountpoint. Mount(minor int, device, path, fs string, flags uintptr, data string) error // Unmount device at mountpoint or decrement refcnt. If device has no // mountpoints left after this operation, it is removed from the matrix. // ErrEnoent is returned if the device or mountpoint for the device is not found. Unmount(source, path string) error }
Mangager defines the interface for keep track of volume driver mounts.
type Mounter ¶
Mounter implements Ops and keeps track of active mounts for volume drivers.
func (*Mounter) Exists ¶
Exists scans mountpaths for specified device and returns true if path is one of the mountpaths. ErrEnoent may be retuned if the device is not found
type NFSMounter ¶
type NFSMounter struct { Mounter // contains filtered or unexported fields }
NFSMounter implements Manager and keeps track of active mounts for volume drivers.
Click to show internal directories.
Click to hide internal directories.