Documentation
¶
Overview ¶
Package minfs contains the MinFS core package
Index ¶
- func CacheDir(path string) func(*Config)
- func Debug() func(*Config)
- func Insecure() func(*Config)
- func Mountpoint(mountpoint string) func(*Config)
- func SetGID(gid uint32) func(*Config)
- func SetUID(uid uint32) func(*Config)
- func Target(target string) func(*Config)
- type AccessConfig
- type Config
- type CopyOperation
- type Dir
- func (dir *Dir) Attr(ctx context.Context, a *fuse.Attr) error
- func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
- func (dir *Dir) Dirent() fuse.Dirent
- func (dir *Dir) FullPath() string
- func (dir *Dir) Lookup(ctx context.Context, name string) (fs.Node, error)
- func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)
- func (dir *Dir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)
- func (dir *Dir) RemotePath() string
- func (dir *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error
- func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, nd fs.Node) error
- type File
- func (f *File) Attr(ctx context.Context, a *fuse.Attr) error
- func (f *File) Dirent() fuse.Dirent
- func (f *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error
- func (f *File) FullPath() string
- func (f *File) Getattr(ctx context.Context, req *fuse.GetattrRequest, resp *fuse.GetattrResponse) error
- func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (f *File) RemotePath() string
- func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- type FileHandle
- func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error
- func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) error
- func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
- type MinFS
- func (mfs *MinFS) Acquire(f *File) (*FileHandle, error)
- func (mfs *MinFS) IsLocked(path string) bool
- func (mfs *MinFS) Lock(path string) error
- func (mfs *MinFS) NewCachePath() (string, error)
- func (mfs *MinFS) NextSequence(tx *meta.Tx) (sequence uint64, err error)
- func (mfs *MinFS) Release(fh *FileHandle) error
- func (mfs *MinFS) Root() (fs.Node, error)
- func (mfs *MinFS) Serve() (err error)
- func (mfs *MinFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) error
- func (mfs *MinFS) Unlock(path string) error
- type MoveOperation
- type Operation
- type PutOperation
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mountpoint ¶
Mountpoint configures the target mountpoint
Types ¶
type AccessConfig ¶
type AccessConfig struct { Version string `json:"version"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` SecretToken string `json:"secretToken"` }
AccessConfig - access credentials and version of `config.json`.
func InitMinFSConfig ¶
func InitMinFSConfig() (*AccessConfig, error)
InitMinFSConfig - Initialize MinFS configuration file.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is being used for storge of configuration items
type CopyOperation ¶
CopyOperation - Copy source object to target.
type Dir ¶
type Dir struct { Path string Inode uint64 Mode os.FileMode Size uint64 ETag string Atime time.Time Mtime time.Time UID uint32 GID uint32 // OS X only Bkuptime time.Time Chgtime time.Time Crtime time.Time Flags uint32 // see chflags(2) // contains filtered or unexported fields }
Dir implements both Node and Handle for the root directory.
func (*Dir) Create ¶
func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
Create will return a new empty file in current dir, if the file is currently locked, it will wait for the lock to be freed.
func (*Dir) ReadDirAll ¶
ReadDirAll will return all files in current dir
func (*Dir) RemotePath ¶
RemotePath returns the full path including parent paths for current dir on the remote
type File ¶
type File struct { Path string Inode uint64 Mode os.FileMode Size uint64 ETag string Atime time.Time Mtime time.Time UID uint32 GID uint32 // OS X only Bkuptime time.Time Chgtime time.Time Crtime time.Time Flags uint32 // see chflags(2) Hash []byte // contains filtered or unexported fields }
File implements both Node and Handle for the hello file.
func (*File) Fsync ¶
Fsync because of bug in fuse lib, this is on file. -- FIXME - needs more context (y4m4).
func (*File) Getattr ¶
func (f *File) Getattr(ctx context.Context, req *fuse.GetattrRequest, resp *fuse.GetattrResponse) error
Getattr returns the file attributes
func (*File) Open ¶
func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
Open return a file handle of the opened file
func (*File) RemotePath ¶
RemotePath will return the full path on bucket
func (*File) Setattr ¶
func (f *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
Setattr - set attribute.
type FileHandle ¶
FileHandle - Contains an opened file which can be read from and written to
func (*FileHandle) Flush ¶
func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error
Flush - experimenting with uploading at flush, this slows operations down till it has been completely flushed
func (*FileHandle) Read ¶
func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
Read from the file handle
func (*FileHandle) Release ¶
func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) error
Release the file handle
func (*FileHandle) Write ¶
func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
Write to the file handle
type MinFS ¶
type MinFS struct {
// contains filtered or unexported fields
}
MinFS contains the meta data for the MinFS client
func (*MinFS) Acquire ¶
func (mfs *MinFS) Acquire(f *File) (*FileHandle, error)
Acquire will return a new FileHandle
func (*MinFS) NextSequence ¶
NextSequence will return the next free iNode
func (*MinFS) Release ¶
func (mfs *MinFS) Release(fh *FileHandle) error
Release release the filehandle
func (*MinFS) Statfs ¶
func (mfs *MinFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) error
Statfs will return meta information on the minio filesystem
type MoveOperation ¶
MoveOperation - Move source object to target object. Copy source to target, delete the source.
type PutOperation ¶
PutOperation - Copy source file to target.