Documentation ¶
Index ¶
- func Mount(mountpoints *Points) (err error)
- func Move(mountpoints *Points, prefix string) (err error)
- func Unmount(mountpoints *Points) (err error)
- type Option
- type Options
- type Point
- func (p *Point) Data() string
- func (p *Point) Flags() uintptr
- func (p *Point) Fstype() string
- func (p *Point) GrowFilesystem() (err error)
- func (p *Point) IsMounted() (bool, error)
- func (p *Point) Mount() (err error)
- func (p *Point) Move(prefix string) (err error)
- func (p *Point) ResizePartition() (err error)
- func (p *Point) Source() string
- func (p *Point) Target() string
- func (p *Point) Unmount() (err error)
- type PointMap
- type Points
- func BPFMountPoints() (mountpoints *Points, err error)
- func CGroupMountPoints() (mountpoints *Points, err error)
- func NewMountPoints() *Points
- func OverlayMountPoints() (mountpoints *Points, err error)
- func PseudoMountPoints() (mountpoints *Points, err error)
- func PseudoSubMountPoints() (mountpoints *Points, err error)
- func SquashfsMountPoints(prefix string) (mountpoints *Points, err error)
- func SystemMountPointsForDevice(devpath string) (mountpoints *Points, err error)
- type PointsIterator
- type RetryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
Option is the functional option func.
func WithOverlay ¶ added in v0.2.0
WithOverlay indicates that a the partition for a given mount point should be mounted using overlayfs.
func WithPrefix ¶
WithPrefix is a functional option for setting the mount point prefix.
func WithReadOnly ¶
WithReadOnly is a functional option for setting the mount point as readonly.
func WithResize ¶ added in v0.2.0
WithResize indicates that a the partition for a given mount point should be resized to the maximum allowed.
func WithShared ¶
WithShared is a functional option for setting the mount point as shared.
type Options ¶
Options is the functional options struct.
func NewDefaultOptions ¶
NewDefaultOptions initializes a Options struct with default values.
type Point ¶
type Point struct { *Options // contains filtered or unexported fields }
Point represents a Linux mount point.
func NewMountPoint ¶
func NewMountPoint(source string, target string, fstype string, flags uintptr, data string, setters ...Option) *Point
NewMountPoint initializes and returns a Point struct.
func SystemMountPointForLabel ¶ added in v0.5.0
SystemMountPointForLabel returns a mount point for the specified device and label.
func (*Point) GrowFilesystem ¶ added in v0.2.0
GrowFilesystem grows a partition's filesystem to the maximum size allowed. NB: An XFS partition MUST be mounted, or this will fail.
func (*Point) IsMounted ¶ added in v0.4.0
IsMounted checks whether mount point is active under /proc/mounts
func (*Point) Mount ¶ added in v0.2.0
Mount attempts to retry a mount on EBUSY. It will attempt a retry every 100 milliseconds over the course of 5 seconds.
func (*Point) ResizePartition ¶ added in v0.2.0
ResizePartition resizes a partition to the maximum size allowed.
type Points ¶
type Points struct {
// contains filtered or unexported fields
}
Points represents an ordered set of mount points.
func BPFMountPoints ¶ added in v0.5.0
BPFMountPoints returns the bpf mount points.
func CGroupMountPoints ¶ added in v0.5.0
CGroupMountPoints returns the cgroup mount points
func NewMountPoints ¶
func NewMountPoints() *Points
NewMountPoints initializes and returns a Points struct.
func OverlayMountPoints ¶ added in v0.5.0
OverlayMountPoints returns the mountpoints required to boot the system. These moiuntpoints are used as overlays on top of the read only rootfs.
func PseudoMountPoints ¶ added in v0.5.0
PseudoMountPoints returns the mountpoints required to boot the system.
func PseudoSubMountPoints ¶ added in v0.5.0
PseudoSubMountPoints returns the mountpoints required to boot the system.
func SquashfsMountPoints ¶ added in v0.5.0
SquashfsMountPoints returns the mountpoints required to boot the system.
func SystemMountPointsForDevice ¶ added in v0.5.0
SystemMountPointsForDevice returns the mountpoints required to boot the system. This function is called exclusively during installations ( both image creation and bare metall installs ). This is why we want to look up device by specified disk as well as why we don't want to grow any filesystems.
func (*Points) Iter ¶
func (p *Points) Iter() *PointsIterator
Iter initializes and returns a mount point iterator.
func (*Points) IterRev ¶
func (p *Points) IterRev() *PointsIterator
IterRev initializes and returns a mount point iterator that advances in reverse.
type PointsIterator ¶
type PointsIterator struct {
// contains filtered or unexported fields
}
PointsIterator represents an iteratable group of mount points.
func (*PointsIterator) Next ¶
func (i *PointsIterator) Next() bool
Next advances the iterator to the next value.
func (*PointsIterator) Value ¶
func (i *PointsIterator) Value() *Point
Value returns current mount point.