mount

package
v0.13.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mount manages creating operating system mount points for directory snapshots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Unmount(ctx context.Context) error
	MountPath() string
	Done() <-chan struct{}
}

Controller allows controlling mounts.

func Directory

func Directory(ctx context.Context, entry fs.Directory, mountPoint string, mountOptions Options) (Controller, error)

Directory mounts the given directory using FUSE.

func DirectoryWebDAV

func DirectoryWebDAV(ctx context.Context, entry fs.Directory) (Controller, error)

DirectoryWebDAV exposes the provided filesystem directory via WebDAV on a random port on localhost and returns a controller.

type Options added in v0.8.0

type Options struct {
	// AllowOther allows other users to access the file system. Supported on FUSE"
	FuseAllowOther bool
	// Allows the mounting over a non-empty directory. The files in it will be shadowed by the freshly created mount.
	// Supported only on Fuse.
	FuseAllowNonEmptyMount bool
	// Use WebDAV even on platforms that support FUSE.
	PreferWebDAV bool
}

Options cary set of flags passed to the mount layer.

Jump to

Keyboard shortcuts

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