user

package
v2.15.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Deprecated: this package will be removed in a future version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(ctx context.Context, path, mountPath string, opts ...MountOpt) error

Mount mounts the primary system partition of the SIF file at path into mountPath.

Mount may start one or more underlying processes. By default, stdout and stderr of these processes is discarded. To modify this behavior, consider using OptMountStdout and/or OptMountStderr.

By default, Mount searches for a squashfuse binary in the directories named by the PATH environment variable. To override this behavior, consider using OptMountSquashfusePath().

func Unmount

func Unmount(ctx context.Context, mountPath string, opts ...UnmountOpt) error

Unmount unmounts the filesystem at mountPath.

Unmount may start one or more underlying processes. By default, stdout and stderr of these processes is discarded. To modify this behavior, consider using OptUnmountStdout and/or OptUnmountStderr.

By default, Unmount searches for a fusermount binary in the directories named by the PATH environment variable. To override this behavior, consider using OptUnmountFusermountPath().

Types

type MountOpt

type MountOpt func(*mountOpts) error

MountOpt are used to specify mount options.

func OptMountSquashfusePath

func OptMountSquashfusePath(path string) MountOpt

OptMountSquashfusePath sets an explicit path to the squashfuse binary. The path must be an absolute or relative path.

func OptMountStderr

func OptMountStderr(w io.Writer) MountOpt

OptMountStderr writes standard error to w.

func OptMountStdout

func OptMountStdout(w io.Writer) MountOpt

OptMountStdout writes standard output to w.

type UnmountOpt

type UnmountOpt func(*unmountOpts) error

UnmountOpt are used to specify unmount options.

func OptUnmountFusermountPath

func OptUnmountFusermountPath(path string) UnmountOpt

OptUnmountFusermountPath sets the path to the fusermount binary.

func OptUnmountStderr

func OptUnmountStderr(w io.Writer) UnmountOpt

OptUnmountStderr writes standard error to w.

func OptUnmountStdout

func OptUnmountStdout(w io.Writer) UnmountOpt

OptUnmountStdout writes standard output to w.

Jump to

Keyboard shortcuts

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