quickfs

package module
v0.0.0-...-4e11fec Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: MIT Imports: 5 Imported by: 0

README

quickfs

QuickFS is a Network Filesystem Protocol

Unlike NFS it is stateless. Unlike WebDAV it is low level.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedFileSystem

type CachedFileSystem struct {
	*FileSystem
	Cache *lru.Cache
}

func (*CachedFileSystem) Init

func (fs *CachedFileSystem) Init(f2 *FileSystem, size int) *CachedFileSystem

func (*CachedFileSystem) Mkfile

func (fs *CachedFileSystem) Mkfile(id *uuid.UUID) error

func (*CachedFileSystem) ReadAt

func (fs *CachedFileSystem) ReadAt(id *uuid.UUID, b []byte, off int64) (int, error)

func (*CachedFileSystem) Readdirnames

func (fs *CachedFileSystem) Readdirnames(id *uuid.UUID) ([]string, error)

func (*CachedFileSystem) Stat

func (fs *CachedFileSystem) Stat(id *uuid.UUID) (os.FileInfo, error)

func (*CachedFileSystem) Truncate

func (fs *CachedFileSystem) Truncate(id *uuid.UUID, size int64) error

func (*CachedFileSystem) WriteAt

func (fs *CachedFileSystem) WriteAt(id *uuid.UUID, b []byte, off int64) (int, error)

type Facade

type Facade interface {
	Lookup(id *uuid.UUID, name string) (*uuid.UUID, error)
	Chtimes(id *uuid.UUID, atime time.Time, mtime time.Time) error
	Truncate(id *uuid.UUID, size int64) error
	WriteAt(id *uuid.UUID, b []byte, off int64) (int, error)
	Readdirnames(id *uuid.UUID) ([]string, error)
}

type Facade2

type Facade2 interface {
	Facade
	HL_Mkdir(id *uuid.UUID, name string) (*uuid.UUID, error)
	HL_Mkfile(id *uuid.UUID, name string) (*uuid.UUID, error)
	HL_Stat(id *uuid.UUID, sb *Statbuf) error
	HL_Delete(id *uuid.UUID, name string) error
	HL_ReadAt(id *uuid.UUID, b []byte, off int64) ([]byte, error)
	HL_Movelink(oid *uuid.UUID, oname string, nid *uuid.UUID, nname string) error

	// RPC-Friendly version of HL_ReadAt
	HL_ReadAt2(id *uuid.UUID, size int, off int64) ([]byte, error)
}

type FileSystem

type FileSystem struct {
	Prefix string
}

func (*FileSystem) Chtimes

func (fs *FileSystem) Chtimes(id *uuid.UUID, atime time.Time, mtime time.Time) error

func (*FileSystem) DelDirent

func (fs *FileSystem) DelDirent(id *uuid.UUID, name string) error

func (*FileSystem) DelDirentFull

func (fs *FileSystem) DelDirentFull(id *uuid.UUID, name string) error

func (*FileSystem) Lookup

func (fs *FileSystem) Lookup(id *uuid.UUID, name string) (*uuid.UUID, error)

func (*FileSystem) Mkdir

func (fs *FileSystem) Mkdir(id *uuid.UUID) error

func (*FileSystem) Open

func (fs *FileSystem) Open(id *uuid.UUID, flag int) (*os.File, error)

func (*FileSystem) PutDirent

func (fs *FileSystem) PutDirent(id *uuid.UUID, name string, child *uuid.UUID) error

func (*FileSystem) Stat

func (fs *FileSystem) Stat(id *uuid.UUID) (os.FileInfo, error)

type HL_Wrap

type HL_Wrap struct {
	LL_Facade
}

func (*HL_Wrap) HL_Delete

func (h *HL_Wrap) HL_Delete(id *uuid.UUID, name string) error

func (*HL_Wrap) HL_Mkdir

func (h *HL_Wrap) HL_Mkdir(id *uuid.UUID, name string) (*uuid.UUID, error)

func (*HL_Wrap) HL_Mkfile

func (h *HL_Wrap) HL_Mkfile(id *uuid.UUID, name string) (*uuid.UUID, error)
func (h *HL_Wrap) HL_Movelink(oid *uuid.UUID, oname string, nid *uuid.UUID, nname string) error

func (*HL_Wrap) HL_ReadAt

func (h *HL_Wrap) HL_ReadAt(id *uuid.UUID, b []byte, off int64) ([]byte, error)

func (*HL_Wrap) HL_ReadAt2

func (h *HL_Wrap) HL_ReadAt2(id *uuid.UUID, size int, off int64) ([]byte, error)

func (*HL_Wrap) HL_Stat

func (h *HL_Wrap) HL_Stat(id *uuid.UUID, sb *Statbuf) error

type LL_Facade

type LL_Facade interface {
	Facade
	Stat(id *uuid.UUID) (os.FileInfo, error)
	Mkfile(id *uuid.UUID) error
	Mkdir(id *uuid.UUID) error
	PutDirent(id *uuid.UUID, name string, child *uuid.UUID) error
	DelDirent(id *uuid.UUID, name string) error
	DelDirentFull(id *uuid.UUID, name string) error
	ReadAt(id *uuid.UUID, b []byte, off int64) (int, error)
}

type Statbuf

type Statbuf struct {
	Size      int64
	ModTime   time.Time
	IsDir     bool
	IsRegular bool
}

func (*Statbuf) FromFileInfo

func (s *Statbuf) FromFileInfo(i os.FileInfo)

Directories

Path Synopsis
examples
Fuse-Binding for QuickFS
Fuse-Binding for QuickFS
RPC Interface for Quickfs
RPC Interface for Quickfs

Jump to

Keyboard shortcuts

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