Documentation ¶
Overview ¶
Package cellstore contains a toolkit for building fast and efficient "write-once, read-only" proximity indices. It is using github.com/bsm/sntable for its underlying storage.
Index ¶
- func NewWriter(w io.Writer, o *sntable.WriterOptions) *sntable.Writer
- type NearbyEntry
- type NearbyRS
- type Reader
- type SectionIterator
- func (i *SectionIterator) CellID() s2.CellID
- func (i *SectionIterator) Err() error
- func (i *SectionIterator) Next() bool
- func (i *SectionIterator) NextSection() bool
- func (i *SectionIterator) PrevSection() bool
- func (i *SectionIterator) Release()
- func (i *SectionIterator) Reset() bool
- func (i *SectionIterator) Value() []byte
- type Sorter
- type SorterIterator
- type SorterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NearbyEntry ¶
NearbyEntry is returned by Nearby search.
type NearbyRS ¶
type NearbyRS struct { Entries []NearbyEntry // contains filtered or unexported fields }
NearbyRS is the nearby result set.
type Reader ¶
Reader represents a cellstore reader
func (*Reader) FindSection ¶
func (r *Reader) FindSection(cellID s2.CellID) (*SectionIterator, error)
FindSection finds a section right before the the cellID.
type SectionIterator ¶
type SectionIterator struct {
// contains filtered or unexported fields
}
SectionIterator is a section iterator
func (*SectionIterator) CellID ¶
func (i *SectionIterator) CellID() s2.CellID
CellID returns the CellID of the current entry.
func (*SectionIterator) Next ¶
func (i *SectionIterator) Next() bool
Next advances the cursor to the next entry in the section.
func (*SectionIterator) NextSection ¶
func (i *SectionIterator) NextSection() bool
NextSection advances the iterator to the next section.
func (*SectionIterator) PrevSection ¶
func (i *SectionIterator) PrevSection() bool
PrevSection advances the cursor to the begin of the previous section.
func (*SectionIterator) Release ¶
func (i *SectionIterator) Release()
Release releases the iterator to the pool.
func (*SectionIterator) Reset ¶
func (i *SectionIterator) Reset() bool
Reset resets the position to the origin.
func (*SectionIterator) Value ¶
func (i *SectionIterator) Value() []byte
Value returns the data of the current entry.
type Sorter ¶
type Sorter struct {
// contains filtered or unexported fields
}
Sorter allows to pre-sort entries to avoid out-of-order appends to Writer instances.
func (*Sorter) Sort ¶
func (s *Sorter) Sort() (*SorterIterator, error)
Sort sorts appended values and returns an iterator.
type SorterIterator ¶
type SorterIterator struct {
// contains filtered or unexported fields
}
SorterIterator iterates over sorted results
func (*SorterIterator) Close ¶
func (i *SorterIterator) Close() error
Close closes iterator and releases resources.
type SorterOptions ¶
type SorterOptions struct { // An optional temporary directory. Default: os.TempDir() TempDir string }
SorterOptions define Sorter specific options.