Documentation ¶
Index ¶
- type Iterator
- func (it *Iterator) Key() []byte
- func (it *Iterator) Next()
- func (it *Iterator) Prev()
- func (it *Iterator) Seek(seekKey []byte)
- func (it *Iterator) SeekForExclusivePrev(target []byte)
- func (it *Iterator) SeekForPrev(target []byte)
- func (it *Iterator) SeekToFirst()
- func (it *Iterator) SeekToLast()
- func (it *Iterator) Valid() bool
- func (it *Iterator) Value() []byte
- type Sandbox
- func (sb *Sandbox) Derive() *Sandbox
- func (sb *Sandbox) Discard()
- func (sb *Sandbox) Flush() int
- func (sb *Sandbox) Get(key []byte) []byte
- func (sb *Sandbox) GetParent() *Sandbox
- func (sb *Sandbox) Len() int
- func (sb *Sandbox) NewIterator() Iterator
- func (sb *Sandbox) Put(key, value []byte)
- func (sb *Sandbox) Size() int
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 iterates the entries in the DB.
func (*Iterator) SeekForExclusivePrev ¶
SeekForExclusivePrev locates the iterator to the last entry with key < target.
func (*Iterator) SeekForPrev ¶
SeekForPrev locates the iterator to the last entry with key <= target.
func (*Iterator) SeekToFirst ¶
func (it *Iterator) SeekToFirst()
SeekToFirst locates the iterator to the first entry.
func (*Iterator) SeekToLast ¶
func (it *Iterator) SeekToLast()
SeekToLast locates the iterator to the last entry.
type Sandbox ¶
type Sandbox struct {
// contains filtered or unexported fields
}
Sandbox is a space to keep pending kvs.
func (*Sandbox) Discard ¶
func (sb *Sandbox) Discard()
Discard discards all kvs in this sandbox. It is safe to discard a flushed sandbox, and it is recommend to call discard using defer to maintain correct state of parent.
func (*Sandbox) NewIterator ¶
NewIterator returns a new Iterator for the lock store.
Click to show internal directories.
Click to hide internal directories.