Documentation ¶
Index ¶
- Constants
- type Aux
- type FileSystem
- type FileSystemRoot
- func (r *FileSystemRoot) AddToReadset(s string)
- func (r *FileSystemRoot) AddToWriteset(s string)
- func (r *FileSystemRoot) ID() string
- func (r *FileSystemRoot) Path() string
- func (r *FileSystemRoot) Readset() map[string]struct{}
- func (r *FileSystemRoot) ReadsetSlice() []string
- func (r *FileSystemRoot) Writeset() map[string]struct{}
- func (r *FileSystemRoot) WritesetSlice() []string
Constants ¶
const DefaultAddr = "127.0.0.1:564"
DefaultAddr is the default address to listen on for the file system.
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) 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.