Documentation
¶
Index ¶
- Constants
- type IndexIterator
- type IndexType
- type ShardedIndex
- func (s *ShardedIndex) Close() error
- func (s *ShardedIndex) Delete(key []byte) *datafile.DataPos
- func (s *ShardedIndex) Get(key []byte) *datafile.DataPos
- func (s *ShardedIndex) Iterator(reverse bool) *IndexIterator
- func (s *ShardedIndex) Put(key []byte, pos *datafile.DataPos) *datafile.DataPos
- func (s *ShardedIndex) Size() int
Constants ¶
View Source
const (
MaxCap = 1 << 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexIterator ¶
type IndexIterator struct {
// contains filtered or unexported fields
}
func (*IndexIterator) Close ¶
func (it *IndexIterator) Close()
func (*IndexIterator) Key ¶
func (it *IndexIterator) Key() []byte
func (*IndexIterator) Next ¶
func (it *IndexIterator) Next()
func (*IndexIterator) Rewind ¶
func (it *IndexIterator) Rewind()
func (*IndexIterator) Seek ¶
func (it *IndexIterator) Seek(key []byte)
func (*IndexIterator) Valid ¶
func (it *IndexIterator) Valid() bool
func (*IndexIterator) Value ¶
func (it *IndexIterator) Value() *datafile.DataPos
type ShardedIndex ¶
type ShardedIndex struct {
// contains filtered or unexported fields
}
ShardedIndex 分片索引, 保证并发安全
func NewShardedIndex ¶
func NewShardedIndex(typ IndexType, shardNum int) *ShardedIndex
func (*ShardedIndex) Close ¶
func (s *ShardedIndex) Close() error
func (*ShardedIndex) Iterator ¶
func (s *ShardedIndex) Iterator(reverse bool) *IndexIterator
func (*ShardedIndex) Size ¶
func (s *ShardedIndex) Size() int
Click to show internal directories.
Click to hide internal directories.