Documentation ¶
Index ¶
- Constants
- Variables
- type MetaConn
- type MetaPartition
- type MetaWrapper
- func (mw *MetaWrapper) AppendExtentKey(inode uint64, ek proto.ExtentKey) error
- func (mw *MetaWrapper) BatchInodeGet(inodes []uint64) []*proto.InodeInfo
- func (mw *MetaWrapper) Cluster() string
- func (mw *MetaWrapper) Create_ll(parentID uint64, name string, mode uint32, target []byte) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Delete_ll(parentID uint64, name string, isDir bool) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Evict(inode uint64) error
- func (mw *MetaWrapper) GetExtents(inode uint64) (gen uint64, size uint64, extents []proto.ExtentKey, err error)
- func (mw *MetaWrapper) InodeGet_ll(inode uint64) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Link(parentID uint64, name string, ino uint64) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Lookup_ll(parentID uint64, name string) (inode uint64, mode uint32, err error)
- func (mw *MetaWrapper) ReadDir_ll(parentID uint64) ([]proto.Dentry, error)
- func (mw *MetaWrapper) Rename_ll(srcParentID uint64, srcName string, dstParentID uint64, dstName string) (err error)
- func (mw *MetaWrapper) Setattr(inode uint64, valid, mode, uid, gid uint32) error
- func (mw *MetaWrapper) Statfs() (total, used uint64)
- func (mw *MetaWrapper) Truncate(inode, size uint64) error
- type VolStatInfo
- type VolumeView
Constants ¶
View Source
const ( OpenRetryInterval = 5 * time.Millisecond OpenRetryLimit = 1000 )
View Source
const ( SendRetryLimit = 100 SendRetryInterval = 100 * time.Millisecond SendTimeLimit = 20 * time.Second )
View Source
const ( HostsSeparator = "," RefreshMetaPartitionsInterval = time.Minute * 5 )
View Source
const (
BatchIgetRespBuf = 1000
)
View Source
const (
MaxSendToMaster = 3
)
Variables ¶
View Source
var (
NotLeader = errors.New("NotLeader")
)
Functions ¶
This section is empty.
Types ¶
type MetaPartition ¶
type MetaPartition struct { PartitionID uint64 Start uint64 End uint64 Members []string LeaderAddr string Status int8 }
func (*MetaPartition) Copy ¶
func (mp *MetaPartition) Copy() btree.Item
func (*MetaPartition) String ¶
func (mp *MetaPartition) String() string
type MetaWrapper ¶
func NewMetaWrapper ¶
func NewMetaWrapper(volname, owner, masterHosts string) (*MetaWrapper, error)
func (*MetaWrapper) AppendExtentKey ¶
func (mw *MetaWrapper) AppendExtentKey(inode uint64, ek proto.ExtentKey) error
Used as a callback by stream sdk
func (*MetaWrapper) BatchInodeGet ¶
func (mw *MetaWrapper) BatchInodeGet(inodes []uint64) []*proto.InodeInfo
func (*MetaWrapper) Cluster ¶
func (mw *MetaWrapper) Cluster() string
func (*MetaWrapper) Evict ¶
func (mw *MetaWrapper) Evict(inode uint64) error
func (*MetaWrapper) GetExtents ¶
func (*MetaWrapper) InodeGet_ll ¶
func (mw *MetaWrapper) InodeGet_ll(inode uint64) (*proto.InodeInfo, error)
func (*MetaWrapper) ReadDir_ll ¶
func (mw *MetaWrapper) ReadDir_ll(parentID uint64) ([]proto.Dentry, error)
func (*MetaWrapper) Setattr ¶
func (mw *MetaWrapper) Setattr(inode uint64, valid, mode, uid, gid uint32) error
func (*MetaWrapper) Statfs ¶
func (mw *MetaWrapper) Statfs() (total, used uint64)
func (*MetaWrapper) Truncate ¶
func (mw *MetaWrapper) Truncate(inode, size uint64) error
type VolStatInfo ¶
type VolumeView ¶
type VolumeView struct { VolName string MetaPartitions []*MetaPartition }
Click to show internal directories.
Click to hide internal directories.