Documentation ¶
Overview ¶
Package bytetree provides a Radix tree that stores []byte keys and values. See https://en.wikipedia.org/wiki/Radix_tree
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func New ¶
func New( outExprs []expr.Expr, inExprs []expr.Expr, outResolution time.Duration, inResolution time.Duration, asOf time.Time, until time.Time, strideSlice time.Duration, ) *Tree
New constructs a new Tree.
func (*Tree) Remove ¶
Remove removes the given key from this Tree under the given ctx. When viewed from this ctx, the key will appear to be gone, but from other contexts it will remain visible.
func (*Tree) Update ¶
func (bt *Tree) Update(key []byte, vals []encoding.Sequence, params encoding.TSParams, metadata bytemap.ByteMap) int
Update updates all of the fields at the given timestamp with the given parameters.
func (*Tree) Walk ¶
func (bt *Tree) Walk(ctx int64, fn func(key []byte, data []encoding.Sequence) (more bool, keep bool, err error)) error
Walk walks this Tree, calling the given fn with each node's key and data. If the fn returns false, the node will be removed from the Tree as viewed with the given ctx. Subsequent walks of the Tree using that same ctx will not see removed nodes, but walks using a different context will still see them.