Documentation ¶
Overview ¶
Package table allows read and write sorted key/value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader represent a table reader.
func NewReader ¶
func NewReader(r storage.Reader, size uint64, o opt.OptionsGetter, cache cache.Namespace) (p *Reader, err error)
NewReader create new initialized table reader.
func (*Reader) ApproximateOffsetOf ¶
ApproximateOffsetOf approximate the offset of given key in bytes.
func (*Reader) Get ¶
Get lookup for given key on the table. Get returns errors.ErrNotFound if given key did not exist.
func (*Reader) NewIterator ¶
func (t *Reader) NewIterator(ro opt.ReadOptionsGetter) iterator.Iterator
NewIterator create new iterator over the table.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer represent a table writer.
func NewWriter ¶
func NewWriter(w storage.Writer, o opt.OptionsGetter) *Writer
NewWriter create new initialized table writer.
func (*Writer) CountBlock ¶
CountBlock return the number of data block written so far.
func (*Writer) Finish ¶
Finish finalize the table. No Add(), Flush() or Finish() is possible beyond this, doing so will raise panic.
Click to show internal directories.
Click to hide internal directories.