Documentation ¶
Index ¶
- Constants
- func MaxUInt64(a, b uint64) uint64
- func TryUnmount(mountPoint string) (err error)
- type API
- type Accession
- type Buffer
- type BufferPool
- type DirHandle
- type DirHandleEntry
- type DirInodeData
- type File
- type FileHandle
- type Fusera
- func (fs *Fusera) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
- func (fs *Fusera) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) (err error)
- func (fs *Fusera) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error)
- func (fs *Fusera) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
- func (fs *Fusera) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) (err error)
- func (fs *Fusera) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)
- func (fs *Fusera) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) (err error)
- func (fs *Fusera) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
- func (fs *Fusera) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
- func (fs *Fusera) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
- func (fs *Fusera) SigUsr1()
- func (fs *Fusera) StatFS(ctx context.Context, op *fuseops.StatFSOp) (err error)
- func (fs *Fusera) SyncFile(ctx context.Context, op *fuseops.SyncFileOp) (err error)
- type Inode
- func (inode *Inode) DeRef(n uint64) (stale bool)
- func (inode *Inode) FullName() *string
- func (inode *Inode) GetAttributes() (*fuseops.InodeAttributes, error)
- func (inode *Inode) GetXattr(name string) ([]byte, error)
- func (inode *Inode) InflateAttributes() (attr fuseops.InodeAttributes)
- func (inode *Inode) ListXattr() ([]string, error)
- func (inode *Inode) OpenDir() (dh *DirHandle)
- func (inode *Inode) OpenFile() (fh *FileHandle, err error)
- func (inode *Inode) Ref()
- func (inode *Inode) ToDir()
- type InodeAttributes
- type MBuf
- func (mb *MBuf) Free()
- func (mb *MBuf) Full() bool
- func (mb MBuf) Init(h *BufferPool, size uint64, block bool) *MBuf
- func (mb *MBuf) Read(p []byte) (n int, err error)
- func (mb *MBuf) Seek(offset int64, whence int) (int64, error)
- func (mb *MBuf) Write(p []byte) (n int, err error)
- func (mb *MBuf) WriteFrom(r io.Reader) (n int, err error)
- type Options
- type ReaderProvider
- type S3ReadBuffer
Constants ¶
View Source
const BufSize = 5 * 1024 * 1024
View Source
const MaxReadAhead = uint32(100 * 1024 * 1024)
View Source
const ReadAheadChunk = uint32(20 * 1024 * 1024)
Variables ¶
This section is empty.
Functions ¶
func TryUnmount ¶
Types ¶
type API ¶
type API interface { Retrieve(accession string) (*Accession, error) RetrieveAll() ([]*Accession, error) Sign(accession string) (*Accession, error) SignAll() ([]*Accession, error) SignAllInBatch(batch int) ([]*Accession, error) AddIdent(link string) (string, error) }
API Describes the functions fuseralib needs in order to properly interact with the SDL API.
type Accession ¶
type Accession struct { ID string `json:"accession,omitempty"` Files map[string]File `json:"files,omitempty"` // contains filtered or unexported fields }
func FetchAccessions ¶
FetchAccessions A convenience function to serve the specific behavior of first calling the SDL API on start up.
func (*Accession) AppendError ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func (*BufferPool) Free ¶
func (pool *BufferPool) Free(buf []byte)
func (BufferPool) Init ¶
func (pool BufferPool) Init() *BufferPool
func (*BufferPool) MaybeGC ¶
func (pool *BufferPool) MaybeGC()
func (*BufferPool) RequestBuffer ¶
func (pool *BufferPool) RequestBuffer() (buf []byte)
func (*BufferPool) RequestMultiple ¶
func (pool *BufferPool) RequestMultiple(size uint64, block bool) (buffers [][]byte)
type DirHandle ¶
type DirHandle struct { Entries []*DirHandleEntry Marker *string BaseOffset int // contains filtered or unexported fields }
func NewDirHandle ¶
type DirHandleEntry ¶
type DirHandleEntry struct { Name *string Inode fuseops.InodeID Type fuseutil.DirentType Offset fuseops.DirOffset Attributes *InodeAttributes ETag *string StorageClass *string }
type DirInodeData ¶
type File ¶
type File struct { Name string `json:"name,omitempty"` Size uint64 `json:"size,omitempty"` Type string `json:"type,omitempty"` ModifiedDate time.Time `json:"modificationDate,omitempty"` Md5Hash string `json:"md5,omitempty"` Link string `json:"link,omitempty"` ExpirationDate time.Time `json:"expirationDate,omitempty"` Bucket string `json:"bucket,omitempty"` Key string `json:"key,omitempty"` Service string `json:"service,omitempty"` Region string `json:"region,omitempty"` PayRequired bool `json:"payRequired,omitempty"` CeRequired bool `json:"ceRequired,omitempty"` }
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(in *Inode) *FileHandle
func (*FileHandle) ReadFile ¶
func (fh *FileHandle) ReadFile(offset int64, buf []byte) (bytesRead int, err error)
func (*FileHandle) Release ¶
func (fh *FileHandle) Release()
type Fusera ¶
type Fusera struct { fuseutil.NotImplementedFileSystem DirMode os.FileMode FileMode os.FileMode // contains filtered or unexported fields }
func Mount ¶
Mount the file system based on the supplied arguments, returning a fuse.MountedFileSystem that can be joined to wait for unmounting.
func (*Fusera) GetInodeAttributes ¶
func (*Fusera) LookUpInode ¶
func (*Fusera) ReleaseDirHandle ¶
func (*Fusera) ReleaseFileHandle ¶
type Inode ¶
type Inode struct { ID fuseops.InodeID Name *string Link string Acc string ErrContents string Attributes InodeAttributes KnownSize *uint64 AttrTime time.Time ReqPays bool Bucket string Key string Region string CeRequired bool Parent *Inode Invalid bool ImplicitDir bool // contains filtered or unexported fields }
func (*Inode) GetAttributes ¶
func (inode *Inode) GetAttributes() (*fuseops.InodeAttributes, error)
func (*Inode) InflateAttributes ¶
func (inode *Inode) InflateAttributes() (attr fuseops.InodeAttributes)
func (*Inode) OpenFile ¶
func (inode *Inode) OpenFile() (fh *FileHandle, err error)
type InodeAttributes ¶
type MBuf ¶
type MBuf struct {
// contains filtered or unexported fields
}
type Options ¶
type Options struct { // The file used to authenticate with the SRA Data Locator API API API Acc []*Accession Region string CloudProfile string // File system MountOptions map[string]string MountPoint string MountPointArg string MountPointCreated string Cache []string UID uint32 GID uint32 // // Debugging Debug bool }
Options is a collection of values that describe how Fusera should behave.
type ReaderProvider ¶
type ReaderProvider func() (io.ReadCloser, error)
type S3ReadBuffer ¶
type S3ReadBuffer struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.