Documentation ¶
Index ¶
- 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) 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
- type PointsIterator
- type RetryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 (*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) 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 NewMountPoints ¶
func NewMountPoints() *Points
NewMountPoints initializes and returns a Points struct.
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.