p9

package
v0.0.0-...-9b306a7 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAddr = "127.0.0.1:564"

DefaultAddr is the default address to listen on for the file system.

View Source
const Type = "9p"

Type represents the type name for this file system.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aux

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

Aux represents auxillary data for 9p file handles.

type FileSystem

type FileSystem struct {
	Addr string

	// Directory to mount to.
	MountPath string
	// contains filtered or unexported fields
}

FileSystem represents a 9p file system.

func NewFileSystem

func NewFileSystem(path string) *FileSystem

NewFileSystem returns a new instance of FileSystem.

func (*FileSystem) Close

func (fs *FileSystem) Close() error

Close closes the file system. Returns after listener has returned.

func (*FileSystem) CreateRoot

func (fs *FileSystem) CreateRoot() bake.FileSystemRoot

CreateRoot returns a new copy of the root path of the file system.

func (*FileSystem) Listener

func (fs *FileSystem) Listener() net.Listener

Listener returns the underlying listener. Available after Open().

func (*FileSystem) Open

func (fs *FileSystem) Open() error

func (*FileSystem) Path

func (fs *FileSystem) Path() string

Path returns the path being served.

func (*FileSystem) Root

func (fs *FileSystem) Root(id string) *FileSystemRoot

Root returns a root by id.

type FileSystemRoot

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

FileSystemRoot represents root path of the file system. This is used for tracking read and write access.

func NewFileSystemRoot

func NewFileSystemRoot(id, path string) *FileSystemRoot

NewFileSystemRoot returns a new filesystem root identified by id.

func (*FileSystemRoot) AddToReadset

func (r *FileSystemRoot) AddToReadset(s string)

AddToReadset adds s to the root's readset.

func (*FileSystemRoot) AddToWriteset

func (r *FileSystemRoot) AddToWriteset(s string)

AddToWriteset adds s to the root's writeset.

func (*FileSystemRoot) ID

func (r *FileSystemRoot) ID() string

ID returns the identifier for this root.

func (*FileSystemRoot) Path

func (r *FileSystemRoot) Path() string

Path returns the path this root is served from.

func (*FileSystemRoot) Readset

func (r *FileSystemRoot) Readset() map[string]struct{}

Readset returns a set of files that have been read from the file system.

func (*FileSystemRoot) ReadsetSlice

func (r *FileSystemRoot) ReadsetSlice() []string

ReadsetSlice returns a slice of files that have been read from the file system.

func (*FileSystemRoot) Writeset

func (r *FileSystemRoot) Writeset() map[string]struct{}

Writeset returns a set of files that have been written to the file system.

func (*FileSystemRoot) WritesetSlice

func (r *FileSystemRoot) WritesetSlice() []string

WritesetSlice returns a slice of files that have been written from the file system.

Jump to

Keyboard shortcuts

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