Documentation ¶
Index ¶
- Variables
- func DefaultTimeoutWheel() *goetty.TimeoutWheel
- func DiskStats(path string) (*disk.UsageStat, error)
- func GZIP(path string) error
- func InitMetric(runner *task.Runner, cfg *MetricCfg)
- func NoConvert(key []byte, do func([]byte) metapb.Cell) metapb.Cell
- func ParseUrls(s string) ([]url.URL, error)
- func PrintVersion() bool
- func Uint64Convert(key []byte, do func([]byte) metapb.Cell) metapb.Cell
- func UnGZIP(file string, dest string) error
- type CellItem
- type CellTree
- func (t *CellTree) Ascend(fn func(cell *metapb.Cell) bool)
- func (t *CellTree) AscendRange(start, end []byte, fn func(cell *metapb.Cell) bool)
- func (t *CellTree) NextCell(start []byte) *metapb.Cell
- func (t *CellTree) Remove(cell metapb.Cell) bool
- func (t *CellTree) Search(key []byte) metapb.Cell
- func (t *CellTree) Update(cell metapb.Cell)
- type KVTree
- func (kv *KVTree) Delete(key []byte) bool
- func (kv *KVTree) Get(key []byte) []byte
- 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 Limiter
- type MetricCfg
- type OffsetQueue
Constants ¶
This section is empty.
Variables ¶
var ( GitCommit = "" BuildTime = "" GoVersion = "" Version = "" )
set on build time
Functions ¶
func DefaultTimeoutWheel ¶
func DefaultTimeoutWheel() *goetty.TimeoutWheel
DefaultTimeoutWheel returns default timeout wheel
func Uint64Convert ¶
Uint64Convert returns the hash crc64 result value, must use `ReleaseConvertBytes` to release
Types ¶
type CellItem ¶
type CellItem struct {
// contains filtered or unexported fields
}
CellItem is the cell btree item
type CellTree ¶
CellTree is the btree for cell
func (*CellTree) AscendRange ¶
AscendRange asc iterator the tree in the range [start, end) until fn returns false
func (*CellTree) Remove ¶
Remove removes a cell if the cell is in the tree. It will do nothing if it cannot find the cell or the found cell is not the same with the cell.
type KVTree ¶
KVTree kv btree
func (*KVTree) RangeDelete ¶
RangeDelete deletes key in [start, end)
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter limiter implemention by token
type OffsetQueue ¶
OffsetQueue is a queue for sync.
func (*OffsetQueue) Add ¶
func (q *OffsetQueue) Add(item interface{}) uint64
Add add a item to the queue
func (*OffsetQueue) Get ¶
func (q *OffsetQueue) Get(offset uint64) ([]interface{}, uint64)
Get returns all the items after the offset, and remove all items before this offset
func (*OffsetQueue) GetMaxOffset ¶
func (q *OffsetQueue) GetMaxOffset() uint64
GetMaxOffset returns the max offset in the queue