Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + const BREAK + const BUSY + const F_UNLCK + const INVALID + const MODE_MASK_R + const MODE_MASK_W + const MODE_MASK_X + const NEW + const O_ACCMODE + const O_RECOVERED + const READY + const REFRESH + var LastBackupDurationG = prometheus.NewGauge(prometheus.GaugeOpts{ ... }) + var LastBackupTimeG = prometheus.NewGauge(prometheus.GaugeOpts{ ... }) + func Backup(m meta.Meta, blob object.ObjectStorage, interval time.Duration, skipTrash bool) + func Compact(conf chunk.Config, store chunk.ChunkStore, slices []meta.Slice, id uint64) error + func GetACLType(name string) uint8 + func GetInternalNodeByName(name string) (Ino, *Attr) + func InitMetrics(registerer prometheus.Registerer) + func IsSpecialName(name string) bool + func IsSpecialNode(ino Ino) bool + type Attr = meta.Attr + type CacheAction uint8 + const CheckCache + const EvictCache + const WarmupCache + func (act CacheAction) String() string + type CacheResponse struct + FileCount uint64 + MissBytes uint64 + SliceCount uint64 + TotalBytes uint64 + func (resp *CacheResponse) Add(other CacheResponse) + type Config struct + AccessLog string + AttrTimeout time.Duration + BackupMeta time.Duration + BackupSkipTrash bool + Chunk *chunk.Config + CommPath string + DebugAgent string + DirEntryTimeout time.Duration + EntryTimeout time.Duration + FastResolve bool + Format meta.Format + FuseOpts *FuseOptions + HideInternal bool + Meta *meta.Config + NonDefaultPermission bool + PPid int + Pid int + Port *Port + PrefixInternal bool + RootSquash *RootSquash + StatePath string + Version string + type Context = LogContext + type DataReader interface + Invalidate func(inode Ino, off, length uint64) + Open func(inode Ino, length uint64) FileReader + Truncate func(inode Ino, length uint64) + func NewDataReader(conf *Config, m meta.Meta, store chunk.ChunkStore) DataReader + type DataWriter interface + Flush func(ctx meta.Context, inode Ino) syscall.Errno + FlushAll func() error + GetLength func(inode Ino) uint64 + Open func(inode Ino, fleng uint64) FileWriter + Truncate func(inode Ino, length uint64) + UpdateMtime func(inode Ino, mtime time.Time) + func NewDataWriter(conf *Config, m meta.Meta, store chunk.ChunkStore, reader DataReader) DataWriter + type Entry meta.Entry + func (entry *Entry) String() string + type FileReader interface + Close func(ctx meta.Context) + GetLength func() uint64 + Read func(ctx meta.Context, off uint64, buf []byte) (int, syscall.Errno) + type FileWriter interface + Close func(ctx meta.Context) syscall.Errno + Flush func(ctx meta.Context) syscall.Errno + GetLength func() uint64 + Truncate func(length uint64) + Write func(ctx meta.Context, offset uint64, data []byte) syscall.Errno + type FuseOptions struct + AllowOther bool + Debug bool + DirectMount bool + DirectMountFlags uintptr + DisableXAttrs bool + DontUmask bool + EnableAcl bool + EnableIoctl bool + EnableLocks bool + EnableWriteback bool + ExplicitDataCacheControl bool + FsName string + IgnoreSecurityLabels bool + MaxBackground int + MaxPages int + MaxReadAhead int + MaxWrite int + Name string + NoAllocForRead bool + Options []string + OtherCaps uint32 + RememberInodes bool + SingleThreaded bool + func (o FuseOptions) StripOptions() FuseOptions + type InfoResponse struct + Chunks []*chunkSlice + FLocks []meta.FLockItem + Failed bool + Ino Ino + Objects []*chunkObj + PLocks []meta.PLockItem + Paths []string + Reason string + Summary meta.Summary + type Ino = meta.Ino + type LogContext interface + Duration func() time.Duration + func NewLogContext(ctx meta.Context) LogContext + type Port struct + ConsulAddr string + DebugAgent string + PrometheusAgent string + PyroscopeAddr string + type RootSquash struct + Gid uint32 + Uid uint32 + type Statfs struct — darwin/amd64, js/wasm, linux/amd64 + Avail uint64 + Favail uint64 + Files uint64 + Total uint64 + type SummaryReponse struct + Errno syscall.Errno + Tree meta.TreeSummary + type VFS struct + Conf *Config + InvalidateEntry func(parent meta.Ino, name string) syscall.Errno + Meta meta.Meta + Store chunk.ChunkStore + UpdateFormat func(*meta.Format) + func NewVFS(conf *Config, m meta.Meta, store chunk.ChunkStore, ...) *VFS + func (v *VFS) Access(ctx Context, ino Ino, mask int) (err syscall.Errno) + func (v *VFS) CopyFileRange(ctx Context, nodeIn Ino, fhIn, offIn uint64, nodeOut Ino, ...) (copied uint64, err syscall.Errno) + func (v *VFS) Create(ctx Context, parent Ino, name string, mode uint16, cumask uint16, flags uint32) (entry *meta.Entry, fh uint64, err syscall.Errno) + func (v *VFS) Fallocate(ctx Context, ino Ino, mode uint8, off, size int64, fh uint64) (err syscall.Errno) + func (v *VFS) Flock(ctx Context, ino Ino, fh uint64, owner uint64, typ uint32, block bool) (err syscall.Errno) + func (v *VFS) Flush(ctx Context, ino Ino, fh uint64, lockOwner uint64) (err syscall.Errno) + func (v *VFS) FlushAll(path string) (err error) + func (v *VFS) Fsync(ctx Context, ino Ino, datasync int, fh uint64) (err syscall.Errno) + func (v *VFS) GetAttr(ctx Context, ino Ino, opened uint8) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) GetXattr(ctx Context, ino Ino, name string, size uint32) (value []byte, err syscall.Errno) + func (v *VFS) Getlk(ctx Context, ino Ino, fh uint64, owner uint64, start, len *uint64, typ *uint32, ...) (err syscall.Errno) + func (v *VFS) Ioctl(ctx Context, ino Ino, cmd uint32, arg uint64, bufIn, bufOut []byte) (err syscall.Errno) + func (v *VFS) Link(ctx Context, ino Ino, newparent Ino, newname string) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) ListXattr(ctx Context, ino Ino, size int) (data []byte, err syscall.Errno) + func (v *VFS) Lookup(ctx Context, parent Ino, name string) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) Mkdir(ctx Context, parent Ino, name string, mode uint16, cumask uint16) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) Mknod(ctx Context, parent Ino, name string, mode uint16, cumask uint16, rdev uint32) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) ModifiedSince(ino Ino, start time.Time) bool + func (v *VFS) Open(ctx Context, ino Ino, flags uint32) (entry *meta.Entry, fh uint64, err syscall.Errno) + func (v *VFS) Opendir(ctx Context, ino Ino, flags uint32) (fh uint64, err syscall.Errno) + func (v *VFS) Read(ctx Context, ino Ino, buf []byte, off uint64, fh uint64) (n int, err syscall.Errno) + func (v *VFS) Readdir(ctx Context, ino Ino, size uint32, off int, fh uint64, plus bool) (entries []*meta.Entry, readAt time.Time, err syscall.Errno) + func (v *VFS) Readlink(ctx Context, ino Ino) (path []byte, err syscall.Errno) + func (v *VFS) Release(ctx Context, ino Ino, fh uint64) + func (v *VFS) ReleaseHandler(ino Ino, fh uint64) + func (v *VFS) Releasedir(ctx Context, ino Ino, fh uint64) int + func (v *VFS) RemoveXattr(ctx Context, ino Ino, name string) (err syscall.Errno) + func (v *VFS) Rename(ctx Context, parent Ino, name string, newparent Ino, newname string, ...) (err syscall.Errno) + func (v *VFS) Rmdir(ctx Context, parent Ino, name string) (err syscall.Errno) + func (v *VFS) SetAttr(ctx Context, ino Ino, set int, fh uint64, mode, uid, gid uint32, ...) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) SetXattr(ctx Context, ino Ino, name string, value []byte, flags uint32) (err syscall.Errno) + func (v *VFS) Setlk(ctx Context, ino Ino, fh uint64, owner uint64, start, end uint64, typ uint32, ...) (err syscall.Errno) + func (v *VFS) StatFS(ctx Context, ino Ino) (st *Statfs, err syscall.Errno) + func (v *VFS) Symlink(ctx Context, path string, parent Ino, name string) (entry *meta.Entry, err syscall.Errno) + func (v *VFS) Truncate(ctx Context, ino Ino, size int64, fh uint64, attr *Attr) (err syscall.Errno) + func (v *VFS) Unlink(ctx Context, parent Ino, name string) (err syscall.Errno) + func (v *VFS) UpdateLength(inode Ino, attr *meta.Attr) + func (v *VFS) UpdateReaddirOffset(ctx Context, ino Ino, fh uint64, off int) + func (v *VFS) Write(ctx Context, ino Ino, buf []byte, off, fh uint64) (err syscall.Errno)