xrdfuse

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package xrdfuse contains the implementation of the FUSE API accessing a remote filesystem served over the XRootD protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler func(error)

ErrorHandler is the function which handles occurred error (e.g. logs it).

type FS

type FS struct {
	pathfs.FileSystem
	// contains filtered or unexported fields
}

FS implements a pathfs.FileSystem that makes requests to the remote server over the XRootD protocol.

func NewFS

func NewFS(client *xrootd.Client, root string, handler ErrorHandler) *FS

NewFS returns a new path.FileSystem representing the filesystem on the remote XRootD server. client is a client connected to the remote XRootD server. root is the path to the remote directory to be used as a root directory. handler is the function which handles occurred error (e.g. logs it). If the handler is nil, then a default handler is used that does nothing.

func (*FS) Chmod

func (fs *FS) Chmod(name string, mode uint32, ctx *fuse.Context) fuse.Status

Chmod implements pathfs.FileSystem.Chmod

func (*FS) GetAttr

func (fs *FS) GetAttr(name string, ctx *fuse.Context) (*fuse.Attr, fuse.Status)

GetAttr implements pathfs.FileSystem.GetAttr

func (*FS) Mkdir

func (fs *FS) Mkdir(name string, mode uint32, ctx *fuse.Context) fuse.Status

Mkdir implements pathfs.FileSystem.Mkdir

func (*FS) Mknod

func (fs *FS) Mknod(name string, mode uint32, dev uint32, ctx *fuse.Context) fuse.Status

Mknod implements pathfs.FileSystem.Mknod

func (*FS) Open

func (fs *FS) Open(name string, flags uint32, ctx *fuse.Context) (file nodefs.File, code fuse.Status)

Open implements pathfs.FileSystem.Open

func (*FS) OpenDir

func (fs *FS) OpenDir(name string, ctx *fuse.Context) (c []fuse.DirEntry, code fuse.Status)

OpenDir implements pathfs.FileSystem.OpenDir

func (*FS) Rename

func (fs *FS) Rename(oldName string, newName string, ctx *fuse.Context) fuse.Status

Rename implements pathfs.FileSystem.Rename

func (*FS) Rmdir

func (fs *FS) Rmdir(name string, ctx *fuse.Context) fuse.Status

Rmdir implements pathfs.FileSystem.Rmdir

func (fs *FS) Unlink(name string, ctx *fuse.Context) fuse.Status

Unlink implements pathfs.FileSystem.Unlink

type File

type File struct {
	nodefs.File
	// contains filtered or unexported fields
}

File represents a file on the remote XRootD server.

func (*File) Flush

func (f *File) Flush() (code fuse.Status)

Flush implements nodefs.File.Flush

func (*File) Fsync

func (f *File) Fsync(flags int) (code fuse.Status)

Fsync implements nodefs.File.Fsync

func (*File) GetAttr

func (f *File) GetAttr(out *fuse.Attr) fuse.Status

GetAttr implements nodefs.File.GetAttr

func (*File) Read

func (f *File) Read(dest []byte, off int64) (fuse.ReadResult, fuse.Status)

Read implements nodefs.File.Read

func (*File) Release

func (f *File) Release()

Release implements nodefs.File.Release

func (*File) Truncate

func (f *File) Truncate(size uint64) fuse.Status

Truncate implements nodefs.File.Truncate

func (*File) Write

func (f *File) Write(data []byte, off int64) (uint32, fuse.Status)

Write implements nodefs.File.Write

Jump to

Keyboard shortcuts

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