client

package
v0.0.0-...-dcd4b28 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileboxClient

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

FileboxClient is responsible for managing the client side of the Filebox protocol. In order to create a new FileboxClient, use the Connect method.

func Connect

func Connect(address string, exit chan struct{}) (*FileboxClient, error)

func (*FileboxClient) SendReceive

func (client *FileboxClient) SendReceive(data interface{}) (interface{}, bool)

type FileboxFileSystem

type FileboxFileSystem struct {
	fuse.FileSystemBase
	Client *FileboxClient
}

func (*FileboxFileSystem) Getattr

func (fs *FileboxFileSystem) Getattr(path string, stat *fuse.Stat_t, fh uint64) (errc int)

Getattr gets file attributes.

func (*FileboxFileSystem) Mkdir

func (fs *FileboxFileSystem) Mkdir(path string, mode uint32) int

Mkdir creates a directory.

func (*FileboxFileSystem) Mknod

func (fs *FileboxFileSystem) Mknod(path string, mode uint32, dev uint64) int

Mknod creates a file.

func (*FileboxFileSystem) Open

func (fs *FileboxFileSystem) Open(path string, flags int) (errc int, fh uint64)

Open opens a file. The flags are a combination of the fuse.O_* constants.

func (*FileboxFileSystem) Read

func (fs *FileboxFileSystem) Read(path string, buff []byte, ofst int64, fh uint64) (n int)

Read reads data from a file.

func (*FileboxFileSystem) Readdir

func (fs *FileboxFileSystem) Readdir(path string,
	fill func(name string, stat *fuse.Stat_t, ofst int64) bool,
	ofst int64,
	fh uint64) (errc int)

Readdir reads a directory.

func (*FileboxFileSystem) Release

func (fs *FileboxFileSystem) Release(path string, fh uint64) int

Release closes an open file.

func (*FileboxFileSystem) Rename

func (fs *FileboxFileSystem) Rename(oldpath string, newpath string) int

Rename renames a file.

func (*FileboxFileSystem) Rmdir

func (fs *FileboxFileSystem) Rmdir(path string) int

Rmdir removes a directory.

func (*FileboxFileSystem) Statfs

func (fs *FileboxFileSystem) Statfs(path string, stat *fuse.Statfs_t) int

func (*FileboxFileSystem) Truncate

func (fs *FileboxFileSystem) Truncate(path string, size int64, fh uint64) int

Truncate changes the size of a file.

func (fs *FileboxFileSystem) Unlink(path string) int

Unlink removes a file.

func (*FileboxFileSystem) Write

func (fs *FileboxFileSystem) Write(path string, buff []byte, ofst int64, fh uint64) int

Write writes data to a file.

Jump to

Keyboard shortcuts

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