fuse

package
v4.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmountWithFuse

func UnmountWithFuse(ctx context.Context, dir string) error

UnmountWithFuse performs an unmount on the specified directory using fusermount -u.

func UnmountWithFuseLazy added in v4.1.0

func UnmountWithFuseLazy(ctx context.Context, dir string) error

UnmountWithFuseLazy performs an unmount on the specified directory using fusermount -z.

Types

type ImageMount

type ImageMount struct {
	// Type represents what type of image this mount involves (from among the
	// values in pkg/image)
	Type int

	// UID is the value to pass to the uid option when mounting
	UID int

	// GID is the value to pass to the gid option when mounting
	GID int

	// Readonly represents whether this is a Readonly overlay
	Readonly bool

	// SourcePath is the path of the image, stripped of any colon-prefixed
	// options (like ":ro")
	SourcePath string

	// EnclosingDir is the location of a secure parent-directory in
	// which to create the actual mountpoint directory
	EnclosingDir string

	// AllowSetuid is set to true to mount the image the "nosuid" option.
	AllowSetuid bool

	// AllowDev is set to true to mount the image without the "nodev" option.
	AllowDev bool

	// AllowOther is set to true to mount the image with the "allow_other" option.
	AllowOther bool

	// ExtraOpts are options to be passed to the mount command (in the "-o"
	// argument) beyond the ones autogenerated from other ImageMount fields.
	ExtraOpts []string
	// contains filtered or unexported fields
}

func (ImageMount) GetMountPoint

func (i ImageMount) GetMountPoint() string

func (*ImageMount) Mount

func (i *ImageMount) Mount(ctx context.Context) (err error)

Mount mounts an image to a temporary directory. It also verifies that the fusermount utility is present before performing the mount.

func (*ImageMount) SetMountPoint

func (i *ImageMount) SetMountPoint(mountpoint string)

func (ImageMount) Unmount

func (i ImageMount) Unmount(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL