ramdisk

package
v0.0.0-...-e014939 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRamFS

func CreateRamFS() *ramdiskFS

func MountAndServe

func MountAndServe(mountpoint string, optionalListener *FSEvents) error

Types

type Dir

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

func (*Dir) Attr

func (d *Dir) Attr(ctx context.Context, a *fuse.Attr) error

func (*Dir) Create

func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

func (*Dir) Lookup

func (d *Dir) Lookup(ctx context.Context, name string) (fs.Node, error)

func (*Dir) ReadDirAll

func (d *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

type EventFileClosed

type EventFileClosed struct {
	FSEvent
}

type EventFileCreated

type EventFileCreated struct {
	FSEvent
}

type EventFileOpened

type EventFileOpened struct {
	FSEvent
}

type EventFileRead

type EventFileRead struct {
	FSEvent
}

type EventFileWritten

type EventFileWritten struct {
	FSEvent
}

type FSEvent

type FSEvent struct {
	File *FileEntry
}

type FSEvents

type FSEvents struct {
	FileCreated chan EventFileCreated
	FileOpened  chan EventFileOpened
	FileRead    chan EventFileRead
	FileWritten chan EventFileWritten
	FileClosed  chan EventFileClosed
	Unmount     chan bool
}

func NewFSEvents

func NewFSEvents() (fsevents FSEvents)

type FileEntry

type FileEntry struct {
	Meta RamFile
	Data []byte
	// contains filtered or unexported fields
}

type Handle

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

implements fs.Handle, fs.HandleWriter, fs.HandleReader

func (Handle) Read

func (h Handle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error

func (Handle) Release

func (h Handle) Release(ctx context.Context, req *fuse.ReleaseRequest) error

func (Handle) Write

func (h Handle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

type RamFile

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

implements fs.Node

func (*RamFile) Attr

func (f *RamFile) Attr(ctx context.Context, a *fuse.Attr) error

func (*RamFile) Inode

func (f *RamFile) Inode() uint64

func (*RamFile) Name

func (f *RamFile) Name() string

func (*RamFile) Open

func (f *RamFile) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)

func (*RamFile) Size

func (f *RamFile) Size() uint64

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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