Documentation
¶
Index ¶
- Constants
- func Copy(ctx context.Context, b *Builder, it *Iterator) error
- func DebugTree(ctx context.Context, cmp CompareFunc, s cadata.Store, x Root, w io.Writer) error
- func HasPrefix(ctx context.Context, cmp CompareFunc, s cadata.Store, x Root, prefix []byte) (bool, error)
- func PointsToEntries(root Root) bool
- func PointsToIndexes(root Root) bool
- type Builder
- type CompareFunc
- type Entry
- type Index
- type IndexHandler
- type Iterator
- type Ref
- type Root
- type Span
- type StreamReader
- type StreamWriter
Constants ¶
View Source
const ( MaxKeySize = 4096 MaxTreeDepth = 255 )
Variables ¶
This section is empty.
Functions ¶
func HasPrefix ¶
func HasPrefix(ctx context.Context, cmp CompareFunc, s cadata.Store, x Root, prefix []byte) (bool, error)
HasPrefix returns true if the tree rooted at x only has keys which are prefixed with prefix
func PointsToEntries ¶
PointsToEntries returns true if root points to non-index Entries
func PointsToIndexes ¶
PointsToIndexes returns true if root points to indexes.
Types ¶
type CompareFunc ¶ added in v0.0.4
CompareFunc compares 2 keys
type Entry ¶
func ListEntries ¶
func ListEntries(ctx context.Context, op *gdat.Operator, cmp CompareFunc, s cadata.Store, idx Index) ([]Entry, error)
ListEntries returns a slice of all the entries pointed to by idx, directly. If idx points to other indexes directly, then ListEntries returns the entries for those indexes.
type IndexHandler ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
type Root ¶
type Root struct { Ref Ref `json:"ref"` Depth uint8 `json:"depth"` First []byte `json:"first,omitempty"` }
Root is the root of the tree
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
func NewStreamReader ¶
func NewStreamReader(s cadata.Store, op *gdat.Operator, cmp CompareFunc, idxs []Index) *StreamReader
func (*StreamReader) SeekIndexes ¶
func (r *StreamReader) SeekIndexes(ctx context.Context, gteq []byte) error
type StreamWriter ¶
type StreamWriter struct {
// contains filtered or unexported fields
}
func NewStreamWriter ¶
func NewStreamWriter(s cadata.Store, op *gdat.Operator, avgSize, maxSize int, seed *[16]byte, onIndex IndexHandler) *StreamWriter
func (*StreamWriter) Buffered ¶
func (w *StreamWriter) Buffered() int
Click to show internal directories.
Click to hide internal directories.