Documentation ¶
Index ¶
- Constants
- Variables
- func ChooseMetaLeaderWatcher()
- func CreateVol(name string, capacity string) int32
- func DialData(host string) (*grpc.ClientConn, error)
- func DialMeta() (*grpc.ClientConn, error)
- func DialVolmgr(host string) (*grpc.ClientConn, error)
- func GetFSInfo(name string) (int32, *mp.GetFSInfoAck)
- func GetMetaLeader()
- func GetVolInfo(name string) (int32, *vp.GetVolInfoAck)
- func ProcessLocalBuffer(buffer []byte, cfile *CFile)
- func ReadLocalAndWriteCFS(filePth string, bufSize int, hookfn func([]byte, *CFile), cfile *CFile) error
- type CFS
- func (cfs *CFS) AllocateChunk(path string) (int32, *mp.ChunkInfoWithBG)
- func (cfs *CFS) CreateDir(path string) int32
- func (cfs *CFS) CreateFile(path string, flags int) (int32, *CFile)
- func (cfs *CFS) DeleteDir(path string) int32
- func (cfs *CFS) DeleteFile(path string) int32
- func (cfs *CFS) GetFileChunks(path string) (int32, []*mp.ChunkInfoWithBG)
- func (cfs *CFS) List(path string) (int32, []*mp.InodeInfo)
- func (cfs *CFS) OpenFile(path string, flags int) (int32, *CFile)
- func (cfs *CFS) Rename(path1 string, path2 string) int32
- func (cfs *CFS) Stat(path string) (int32, *mp.InodeInfo)
- func (cfs *CFS) UpdateOpenFile(cfile *CFile, flags int) int32
- type CFile
- func (cfile *CFile) Close(flags int) int32
- func (cfile *CFile) DestroyChannel()
- func (cfile *CFile) Flush() int32
- func (cfile *CFile) Read(handleId fuse.HandleID, data *[]byte, offset int64, readsize int64) int64
- func (cfile *CFile) Sync() int32
- func (cfile *CFile) Write(buf []byte, len int32) int32
- type ReaderInfo
Constants ¶
View Source
const ( O_RDONLY = os.O_RDONLY // 0 00000000000000000000000000000000 O_WRONLY = os.O_WRONLY // 1 00000000000000000000000000000001 O_RDWR = os.O_RDWR // 2 00000000000000000000000000000010 O_APPEND = os.O_APPEND // 1024 00000000000000000000010000000000 O_CREATE = os.O_CREATE // 64 00000000000000000000000001000000 O_TRUNC = os.O_TRUNC // 512 00000000000000000000001000000000 O_EXCL = os.O_EXCL // 0x4000 O_MVOPT = O_RDONLY | 0x20000 O_TAROPT = O_MVOPT | syscall.O_NONBLOCK O_SCPOPT = O_RDONLY | syscall.O_NONBLOCK )
Variables ¶
View Source
var EtcdEndPoints []string
View Source
var MetaNodeAddr string
View Source
var VolMgrAddr string
Functions ¶
func ChooseMetaLeaderWatcher ¶
func ChooseMetaLeaderWatcher()
func DialMeta ¶
func DialMeta() (*grpc.ClientConn, error)
func DialVolmgr ¶
func DialVolmgr(host string) (*grpc.ClientConn, error)
func GetMetaLeader ¶
func GetMetaLeader()
func GetVolInfo ¶
func GetVolInfo(name string) (int32, *vp.GetVolInfoAck)
func ProcessLocalBuffer ¶
Types ¶
type CFS ¶
func OpenFileSystem ¶
func (*CFS) AllocateChunk ¶
func (cfs *CFS) AllocateChunk(path string) (int32, *mp.ChunkInfoWithBG)
func (*CFS) DeleteFile ¶
func (*CFS) GetFileChunks ¶
func (cfs *CFS) GetFileChunks(path string) (int32, []*mp.ChunkInfoWithBG)
type CFile ¶
type CFile struct { Path string OpenFlag int FileSize int64 // for write WMutex sync.Mutex Writer int32 // for read //lastoffset int64 RMutex sync.Mutex //readBuf []byte ReaderMap map[fuse.HandleID]*ReaderInfo // contains filtered or unexported fields }
func (*CFile) DestroyChannel ¶
func (cfile *CFile) DestroyChannel()
type ReaderInfo ¶
Click to show internal directories.
Click to hide internal directories.