Documentation ¶
Overview ¶
System permissions-related code.
Index ¶
- Constants
- Variables
- func Dup(value []byte) []byte
- func GetStdLogger(l *LogHandle, lvl logrus.Level) *glog.Logger
- func InitLoggers(logToSyslog bool)
- func MassageMountFlags(args []string) (ret []string)
- func MaxInt(a, b int) int
- func MaxUInt32(a, b uint32) uint32
- func MaxUInt64(a, b uint64) uint64
- func MinInt(a, b int) int
- func MinUInt32(a, b uint32) uint32
- func MinUInt64(a, b uint64) uint64
- func MyUserAndGroup() (uid int, gid int)
- func NewApp() (app *cli.App)
- func RandStringBytesMaskImprSrc(n int) string
- func SignV2(req *request.Request)
- func TryUnmount(mountPoint string) (err error)
- type Buffer
- type BufferPool
- type DirHandle
- type DirHandleEntry
- type DirInodeData
- 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) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) (err error)
- func (fs *Goofys) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error)
- func (fs *Goofys) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err 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) RemoveXattr(ctx context.Context, op *fuseops.RemoveXattrOp) (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) SetXattr(ctx context.Context, op *fuseops.SetXattrOp) (err error)
- func (fs *Goofys) SigUsr1()
- 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(name string) (inode *Inode, fh *FileHandle)
- 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 (parent *Inode) LookUp(name string) (inode *Inode, err error)
- func (parent *Inode) LookUpInodeDir(name string, c chan s3.ListObjectsOutput, errc chan error)
- func (parent *Inode) LookUpInodeMaybeDir(name string, fullName string) (inode *Inode, err error)
- func (parent *Inode) LookUpInodeNotDir(name string, c chan s3.HeadObjectOutput, errc chan error)
- func (parent *Inode) MkDir(name string) (inode *Inode, err error)
- func (inode *Inode) OpenDir() (dh *DirHandle)
- func (inode *Inode) OpenFile() (fh *FileHandle, err error)
- func (inode *Inode) Ref()
- func (inode *Inode) RemoveXattr(name string) error
- func (parent *Inode) Rename(from string, newParent *Inode, to string) (err error)
- func (parent *Inode) RmDir(name string) (err error)
- func (inode *Inode) SetXattr(name string, value []byte, flags uint32) error
- func (inode *Inode) ToDir()
- func (parent *Inode) Unlink(name string) (err error)
- type InodeAttributes
- type LogHandle
- 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) Len() (length int)
- 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 ReaderProvider
- type S3ReadBuffer
- type Ticket
Constants ¶
View Source
const BUF_SIZE = 5 * 1024 * 1024
View Source
const MAX_READAHEAD = uint32(100 * 1024 * 1024)
View Source
const READAHEAD_CHUNK = uint32(20 * 1024 * 1024)
Variables ¶
View Source
var VersionHash string
Functions ¶
func InitLoggers ¶ added in v0.0.3
func InitLoggers(logToSyslog bool)
func MassageMountFlags ¶ added in v0.0.3
func MyUserAndGroup ¶
Return the UID and GID of this process.
func RandStringBytesMaskImprSrc ¶ added in v0.0.8
func SignV2 ¶ added in v0.0.4
Sign requests with signature version 2.
Will sign the requests with the service config's Credentials object Signing is skipped if the credentials is the credentials.AnonymousCredentials object.
func TryUnmount ¶ added in v0.0.18
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func (*BufferPool) Free ¶ added in v0.0.7
func (pool *BufferPool) Free(buf []byte)
func (BufferPool) Init ¶ added in v0.0.4
func (pool BufferPool) Init() *BufferPool
func (*BufferPool) MaybeGC ¶ added in v0.0.6
func (pool *BufferPool) MaybeGC()
func (*BufferPool) RequestBuffer ¶ added in v0.0.7
func (pool *BufferPool) RequestBuffer() (buf []byte)
func (*BufferPool) RequestMultiple ¶ added in v0.0.7
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 ¶ added in v0.0.14
type DirHandleEntry struct { Name *string Inode fuseops.InodeID Type fuseutil.DirentType Offset fuseops.DirOffset Attributes *InodeAttributes ETag *string StorageClass *string }
type DirInodeData ¶ added in v0.0.17
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func NewFileHandle ¶
func NewFileHandle(in *Inode) *FileHandle
func (*FileHandle) FlushFile ¶
func (fh *FileHandle) FlushFile() (err error)
func (*FileHandle) ReadFile ¶
func (fh *FileHandle) ReadFile(offset int64, buf []byte) (bytesRead int, err error)
func (*FileHandle) Release ¶ added in v0.0.4
func (fh *FileHandle) Release()
type FlagStorage ¶
type FlagStorage struct { // File system MountOptions map[string]string MountPoint string MountPointArg string MountPointCreated string Cache []string DirMode os.FileMode FileMode os.FileMode Uid uint32 Gid uint32 // S3 Endpoint string Region string RegionSet bool StorageClass string Profile string UseContentType bool UseSSE bool UseKMS bool KMSKeyID string ACL string // Tuning Cheap bool ExplicitDir bool StatCacheTTL time.Duration TypeCacheTTL time.Duration // Debugging DebugFuse bool DebugS3 bool Foreground bool }
func PopulateFlags ¶
func PopulateFlags(c *cli.Context) (ret *FlagStorage)
Add the flags accepted by run to the supplied flag set, returning the variables into which the flags will parse.
func (*FlagStorage) Cleanup ¶ added in v0.0.16
func (flags *FlagStorage) Cleanup()
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) ReleaseDirHandle ¶
func (*Goofys) ReleaseFileHandle ¶
func (*Goofys) RemoveXattr ¶ added in v0.0.14
func (*Goofys) SetInodeAttributes ¶
type Inode ¶
type Inode struct { Id fuseops.InodeID Name *string Attributes InodeAttributes KnownSize *uint64 AttrTime time.Time Parent *Inode Invalid bool ImplicitDir bool // contains filtered or unexported fields }
func (*Inode) GetAttributes ¶
func (inode *Inode) GetAttributes() (*fuseops.InodeAttributes, error)
func (*Inode) InflateAttributes ¶ added in v0.0.17
func (inode *Inode) InflateAttributes() (attr fuseops.InodeAttributes)
func (*Inode) LookUpInodeDir ¶ added in v0.0.17
func (parent *Inode) LookUpInodeDir(name string, c chan s3.ListObjectsOutput, errc chan error)
func (*Inode) LookUpInodeMaybeDir ¶ added in v0.0.17
returned inode has nil Id
func (*Inode) LookUpInodeNotDir ¶ added in v0.0.17
func (parent *Inode) LookUpInodeNotDir(name string, c chan s3.HeadObjectOutput, errc chan error)
func (*Inode) OpenFile ¶
func (inode *Inode) OpenFile() (fh *FileHandle, err error)
func (*Inode) Ref ¶
func (inode *Inode) Ref()
LOCKS_REQUIRED(fs.mu) XXX why did I put lock required? This used to return a resurrect bool which no long does anything, need to look into that to see if that was legacy
func (*Inode) RemoveXattr ¶ added in v0.0.14
type InodeAttributes ¶ added in v0.0.17
type MBuf ¶ added in v0.0.4
type MBuf struct {
// contains filtered or unexported fields
}
func (MBuf) Init ¶ added in v0.0.4
func (mb MBuf) Init(h *BufferPool, size uint64, block bool) *MBuf
type ReaderProvider ¶ added in v0.0.4
type ReaderProvider func() (io.ReadCloser, error)
type S3ReadBuffer ¶ added in v0.0.4
type S3ReadBuffer struct {
// contains filtered or unexported fields
}
func (S3ReadBuffer) Init ¶ added in v0.0.4
func (b S3ReadBuffer) Init(fh *FileHandle, offset uint64, size uint32) *S3ReadBuffer
Click to show internal directories.
Click to hide internal directories.