Documentation
¶
Index ¶
- Variables
- func CpuUsages() ([]float64, error)
- func DiskStats(path string) (*disk.UsageStat, error)
- func GZIP(fs vfs.FS, path string) error
- func GetTestDir() string
- func IORates(path string) (map[string]disk.IOCountersStat, error)
- func IsDarwin() bool
- func MemStats() (*mem.VirtualMemoryStat, error)
- func RAMDiskDirExist(dir string) bool
- func UnGZIP(fs vfs.FS, file string, dest string) error
- type KVTree
- func (kv *KVTree) Delete(key []byte) bool
- func (kv *KVTree) Get(key []byte) []byte
- func (kv *KVTree) PrefixScan(prefix []byte, handler func(key, value []byte) (bool, error)) error
- func (kv *KVTree) Put(key, value []byte)
- func (kv *KVTree) RangeDelete(start, end []byte)
- func (kv *KVTree) Scan(start, end []byte, handler func(key, value []byte) (bool, error)) error
- func (kv *KVTree) Seek(key []byte) ([]byte, []byte)
- type Session
- type ShardItem
- type ShardTree
- func (t *ShardTree) Ascend(fn func(Shard *bhmetapb.Shard) bool)
- func (t *ShardTree) AscendRange(start, end []byte, fn func(Shard *bhmetapb.Shard) bool)
- func (t *ShardTree) NextShard(start []byte) *bhmetapb.Shard
- func (t *ShardTree) Remove(Shard bhmetapb.Shard) bool
- func (t *ShardTree) Search(key []byte) bhmetapb.Shard
- func (t *ShardTree) Update(shard bhmetapb.Shard)
- type WriteBatch
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // OpSet op set OpSet int32 = 0 // OpDelete op delete OpDelete int32 = 1 )
View Source
var (
DefaultTimeoutWheel = putil.DefaultTimeoutWheel
)
Functions ¶
func MemStats ¶
func MemStats() (*mem.VirtualMemoryStat, error)
MemStats returns the mem usage stats
func RAMDiskDirExist ¶
RAMDiskDirExist returns whether the specified directory is a mounted RAM disk,
Types ¶
type KVTree ¶
KVTree kv btree
func (*KVTree) PrefixScan ¶
PrefixScan Scan scans all keys startswith pre
func (*KVTree) RangeDelete ¶
RangeDelete deletes key in [start, end)
type Session ¶
type Session struct { ID interface{} Addr string // contains filtered or unexported fields }
Session session
func NewSession ¶
NewSession create a client session
type ShardItem ¶
ShardItem is the Shard btree item
type ShardTree ¶
ShardTree is the btree for Shard
func (*ShardTree) AscendRange ¶
AscendRange asc iterator the tree in the range [start, end) until fn returns false
func (*ShardTree) Remove ¶
Remove removes a Shard if the Shard is in the tree. It will do nothing if it cannot find the Shard or the found Shard is not the same with the Shard.
type WriteBatch ¶
WriteBatch write batch
func (*WriteBatch) Set ¶
func (wb *WriteBatch) Set(key []byte, value []byte) error
Set set key, value
func (*WriteBatch) SetWithTTL ¶
func (wb *WriteBatch) SetWithTTL(key []byte, value []byte, ttl int32) error
SetWithTTL set key, value with TTL in seconds
Source Files
¶
Click to show internal directories.
Click to hide internal directories.