RiverFS

package module
v0.0.0-...-503eecc Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2013 License: BSD-3-Clause Imports: 7 Imported by: 0

README

RiverFS

Goal: fuse mounted distributed filesystem in Go (golang).

This is still experimental and doesn't work yet.

Things that are done

In memory directory tree structer mounted via fuse supporting:

ls, rm, mkdir, touch, cd, mv, cp

Place holder file code that ignores file contents.

Todo

Synchronize dir tree state across nodes via raft

Read, Write and Stream file data via http (or?).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuseMount

func FuseMount(mountpoint string)

func StartRaftServer

func StartRaftServer(me string, path string, lead bool, peers []string)

Types

type Dir

type Dir struct {
	Node

	Children map[string]fs.Node
	// contains filtered or unexported fields
}

func NewDir

func NewDir() (d *Dir)

func (*Dir) Add

func (d *Dir) Add(name string, n fs.Node)

func (*Dir) Create

func (d *Dir) Create(req *fuse.CreateRequest, resp *fuse.CreateResponse, intr fs.Intr) (fs.Node, fs.Handle, fuse.Error)

func (*Dir) Lookup

func (d *Dir) Lookup(name string, intr fs.Intr) (fs fs.Node, err fuse.Error)

func (*Dir) Mkdir

func (d *Dir) Mkdir(req *fuse.MkdirRequest, intr fs.Intr) (n fs.Node, ferr fuse.Error)

func (*Dir) ReadDir

func (d *Dir) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error)

func (*Dir) Remove

func (d *Dir) Remove(req *fuse.RemoveRequest, intr fs.Intr) fuse.Error

func (*Dir) Rename

func (d *Dir) Rename(req *fuse.RenameRequest, newDir fs.Node, intr fs.Intr) fuse.Error

func (*Dir) Rm

func (d *Dir) Rm(name string)

type File

type File struct {
	Node
}

func (*File) ReadAll

func (f *File) ReadAll(intr fs.Intr) (out []byte, ferr fuse.Error)

func (*File) WriteAll

func (f *File) WriteAll(in []byte, intr fs.Intr) fuse.Error

type Node

type Node struct {
	Name string
	Mode os.FileMode
}

func (*Node) Attr

func (n *Node) Attr() fuse.Attr

func (*Node) Setattr

func (n *Node) Setattr(req *fuse.SetattrRequest, resp *fuse.SetattrResponse, intr fs.Intr) fuse.Error

type RootDir

type RootDir struct {
	Dir *Dir
}

func NewRootDir

func NewRootDir() (r *RootDir)

func (*RootDir) Root

func (nf *RootDir) Root() (fs.Node, fuse.Error)

type StateMachine

type StateMachine struct{}

func (*StateMachine) Recovery

func (s *StateMachine) Recovery(bs []byte) error

func (*StateMachine) Save

func (s *StateMachine) Save() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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