composefs

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package composefs provides a way to compose p9 files and file systems into one p9 file server.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFlatHierarchy = errors.New("composefs only supports a flat hierarchy")
	ErrFileExists    = errors.New("file already exists")
)

Functions

This section is empty.

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS is a p9.Attacher.

func New

func New(mounts ...Opt) (*FS, error)

func (*FS) Attach

func (fs *FS) Attach() (p9.File, error)

Attach implements p9.Attacher.Attach.

type Opt

type Opt func(fs *FS) error

func WithDir

func WithDir(dir string, mounts ...Opt) Opt

WithDir creates a composefs from the given options and mounts it at dir.

func WithFile

func WithFile(file string, f p9.File) Opt

func WithMount

func WithMount(dir string, attacher p9.Attacher) Opt

Jump to

Keyboard shortcuts

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