Documentation
¶
Index ¶
- type Iterator
- func (i *Iterator) Close()
- func (i *Iterator) Err() error
- func (i *Iterator) Initialize() (skipNext bool, err error)
- func (i *Iterator) Key() []byte
- func (i *Iterator) Next() bool
- func (i *Iterator) Seek(k []byte) error
- func (i *Iterator) Valid() bool
- func (i *Iterator) Value() ([]byte, error)
- func (i *Iterator) ValueCopy(bt []byte) ([]byte, error)
- type Ops
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator implements the KVTX Iterator interface by scanning all keys into an in-memory tree set. This implements (fills) the Iterator interface for stores that do not support iteration.
Note: iterator is tested in store/kvtx/inmem.
func NewIterator ¶
NewIterator constructs a new iterator. Initial key fetch is deferred to the first Next() call.
func (*Iterator) Close ¶
func (i *Iterator) Close()
Close releases the resources associated with the iterator.
func (*Iterator) Err ¶
Err returns an error that invalidated iterator. If Err is not nil then Valid must return false.
func (*Iterator) Initialize ¶
Initialize intializes the iterator, fetching all keys into memory.
func (*Iterator) Seek ¶
Seek moves the iterator to the first key >= the provided key (or <= in reverse mode). Pass nil to seek to the beginning (or end if reversed).