Documentation
¶
Index ¶
- Variables
- type Bucket
- type CuckooFilter
- type MMAPTable
- func (f *MMAPTable) Bucket(index uint) (*Bucket, error)
- func (f *MMAPTable) BucketNum() uint
- func (f *MMAPTable) Close() error
- func (f *MMAPTable) Count() uint
- func (f *MMAPTable) DecrCount()
- func (f *MMAPTable) Encode(writer io.Writer) error
- func (f *MMAPTable) IncrCount()
- func (f *MMAPTable) SetSlot(index uint, slot uint, fingerprint byte) error
- func (f *MMAPTable) Slot(index uint, slot uint) (byte, error)
- func (f *MMAPTable) Truncate() error
- type MemTable
- func (t *MemTable) Bucket(index uint) (*Bucket, error)
- func (t *MemTable) BucketNum() uint
- func (t *MemTable) Close() error
- func (t *MemTable) Count() uint
- func (t *MemTable) DecrCount()
- func (t *MemTable) Encode(writer io.Writer) error
- func (t *MemTable) IncrCount()
- func (t *MemTable) SetSlot(index uint, offset uint, fingerprint byte) error
- func (t *MemTable) Slot(index uint, offset uint) (byte, error)
- func (t *MemTable) Truncate() error
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExist = fmt.Errorf("已存在相同记录")
View Source
var ErrFull = fmt.Errorf("移位次数过多")
View Source
var ErrNotExist = fmt.Errorf("未找到记录")
Functions ¶
This section is empty.
Types ¶
type CuckooFilter ¶
type CuckooFilter struct {
// contains filtered or unexported fields
}
func NewCuckooFilter ¶
func NewCuckooFilter(table Table) *CuckooFilter
func (*CuckooFilter) Count ¶
func (c *CuckooFilter) Count() uint
func (*CuckooFilter) Delete ¶
func (c *CuckooFilter) Delete(data []byte) error
func (*CuckooFilter) InsertUnique ¶
func (c *CuckooFilter) InsertUnique(data []byte) error
func (*CuckooFilter) Truncate ¶
func (c *CuckooFilter) Truncate() error
type MMAPTable ¶
type MMAPTable struct {
// contains filtered or unexported fields
}
type MemTable ¶
type MemTable struct {
// contains filtered or unexported fields
}
func NewMemTable ¶
type Table ¶
type Table interface {
// 获取指定索引位置的Bucket
Bucket(index uint) (*Bucket, error)
BucketNum() uint
// 获取指定槽
Slot(index uint, slot uint) (byte, error)
// 设置槽
SetSlot(index uint, slot uint, fingerprint byte) error
// 编码, 可用于保存哈希表
Encode(io.Writer) error
// fingerprint数量
IncrCount()
DecrCount()
Count() uint
// 清空数据
Truncate() error
io.Closer
}
Click to show internal directories.
Click to hide internal directories.