Documentation ¶
Overview ¶
System permissions-related code.
Index ¶
- Constants
- func GetLogger(name string) *logHandle
- func GetStdLogger(l *logHandle, lvl logrus.Level) *glog.Logger
- func MyUserAndGroup() (uid uint32, gid uint32, err error)
- func NewApp() (app *cli.App)
- func NewLogger(name string) *logHandle
- type BufferPool
- type BufferPoolHandle
- type DirHandle
- type FileHandle
- type FlagStorage
- type Goofys
- func (fs *Goofys) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) (err error)
- func (fs *Goofys) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) (err error)
- func (fs *Goofys) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) (err error)
- func (fs *Goofys) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)
- func (fs *Goofys) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)
- func (fs *Goofys) LookUpInodeDir(name string, c chan s3.ListObjectsOutput, errc chan error)
- func (fs *Goofys) LookUpInodeMaybeDir(name string, fullName string) (inode *Inode, err error)
- func (fs *Goofys) LookUpInodeNotDir(name string, c chan s3.HeadObjectOutput, errc chan error)
- func (fs *Goofys) MkDir(ctx context.Context, op *fuseops.MkDirOp) (err error)
- func (fs *Goofys) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) (err error)
- func (fs *Goofys) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)
- func (fs *Goofys) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) (err error)
- func (fs *Goofys) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
- func (fs *Goofys) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)
- func (fs *Goofys) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)
- func (fs *Goofys) Rename(ctx context.Context, op *fuseops.RenameOp) (err error)
- func (fs *Goofys) RmDir(ctx context.Context, op *fuseops.RmDirOp) (err error)
- func (fs *Goofys) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)
- func (fs *Goofys) StatFS(ctx context.Context, op *fuseops.StatFSOp) (err error)
- func (fs *Goofys) SyncFile(ctx context.Context, op *fuseops.SyncFileOp) (err error)
- func (fs *Goofys) Unlink(ctx context.Context, op *fuseops.UnlinkOp) (err error)
- func (fs *Goofys) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) (err error)
- type Inode
- func (parent *Inode) Create(fs *Goofys, name string) (inode *Inode, fh *FileHandle)
- func (inode *Inode) DeRef(n uint64) (stale bool)
- func (inode *Inode) GetAttributes(fs *Goofys) (*fuseops.InodeAttributes, error)
- func (parent *Inode) LookUp(fs *Goofys, name string) (inode *Inode, err error)
- func (parent *Inode) MkDir(fs *Goofys, name string) (inode *Inode, err error)
- func (inode *Inode) OpenDir() (dh *DirHandle)
- func (inode *Inode) OpenFile(fs *Goofys) *FileHandle
- func (inode *Inode) Ref()
- func (parent *Inode) Rename(fs *Goofys, from string, newParent *Inode, to string) (err error)
- func (parent *Inode) RmDir(fs *Goofys, name string) (err error)
- func (parent *Inode) Unlink(fs *Goofys, name string) (err error)
Constants ¶
View Source
const BUF_SIZE = 5 * 1024 * 1024
View Source
const REGION_ERROR_MSG = "The authorization header is malformed; the region %s is wrong; expecting %s"
Variables ¶
This section is empty.
Functions ¶
func MyUserAndGroup ¶
Return the UID and GID of this process.
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool(maxSizeGlobal int64, maxSizePerHandle int64) *BufferPool
func (*BufferPool) NewPoolHandle ¶
func (pool *BufferPool) NewPoolHandle() *BufferPoolHandle
type BufferPoolHandle ¶
type BufferPoolHandle struct {
// contains filtered or unexported fields
}
func (*BufferPoolHandle) Copy ¶
func (h *BufferPoolHandle) Copy(to *[]byte, from []byte) (nCopied int)
copy from -> to, reslicing to if necessary
func (*BufferPoolHandle) Free ¶
func (h *BufferPoolHandle) Free(buf []byte)
func (*BufferPoolHandle) Request ¶
func (h *BufferPoolHandle) Request() []byte
type DirHandle ¶
type DirHandle struct { Entries []fuseutil.Dirent NameToEntry map[string]fuseops.InodeAttributes // XXX use a smaller struct Marker *string BaseOffset int // contains filtered or unexported fields }
func NewDirHandle ¶
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(in *Inode) *FileHandle
func (*FileHandle) FlushFile ¶
func (fh *FileHandle) FlushFile(fs *Goofys) (err error)
type FlagStorage ¶
type FlagStorage struct { // File system MountOptions map[string]string DirMode os.FileMode FileMode os.FileMode Uid uint32 Gid uint32 // S3 Endpoint string StorageClass string UsePathRequest bool // Tuning StatCacheTTL time.Duration TypeCacheTTL time.Duration // Debugging DebugFuse bool DebugS3 bool }
func PopulateFlags ¶
func PopulateFlags(c *cli.Context) (flags *FlagStorage)
Add the flags accepted by run to the supplied flag set, returning the variables into which the flags will parse.
type Goofys ¶
type Goofys struct { fuseutil.NotImplementedFileSystem // contains filtered or unexported fields }
func (*Goofys) CreateFile ¶
func (*Goofys) ForgetInode ¶
LOCKS_EXCLUDED(fs.mu)
func (*Goofys) GetInodeAttributes ¶
func (*Goofys) LookUpInode ¶
func (*Goofys) LookUpInodeDir ¶
func (fs *Goofys) LookUpInodeDir(name string, c chan s3.ListObjectsOutput, errc chan error)
func (*Goofys) LookUpInodeMaybeDir ¶
returned inode has nil Id
func (*Goofys) LookUpInodeNotDir ¶
func (fs *Goofys) LookUpInodeNotDir(name string, c chan s3.HeadObjectOutput, errc chan error)
func (*Goofys) ReleaseDirHandle ¶
func (*Goofys) ReleaseFileHandle ¶
func (*Goofys) SetInodeAttributes ¶
type Inode ¶
type Inode struct { Id fuseops.InodeID Name *string FullName *string Attributes *fuseops.InodeAttributes // contains filtered or unexported fields }
func (*Inode) Create ¶
func (parent *Inode) Create( fs *Goofys, name string) (inode *Inode, fh *FileHandle)
func (*Inode) GetAttributes ¶
func (inode *Inode) GetAttributes(fs *Goofys) (*fuseops.InodeAttributes, error)
func (*Inode) OpenFile ¶
func (inode *Inode) OpenFile(fs *Goofys) *FileHandle
Source Files ¶
Click to show internal directories.
Click to hide internal directories.