Documentation ¶
Index ¶
- Constants
- func Copy[Ref any](ctx context.Context, b *Builder[Ref], it *Iterator[Ref]) error
- func PathCompare(a, b Path) int
- func Walk[Ref any](ctx context.Context, s Storage[Ref], root Root[Ref], w Walker[Ref]) error
- type Builder
- type Entry
- type Index
- type IndexCallback
- type Iterator
- type Path
- type Root
- type Span
- type Storage
- type StreamEntry
- type StreamReader
- type StreamWriter
- type Walker
- type Weight
- type WriteStorage
Constants ¶
View Source
const MaxIndent = 64
Variables ¶
This section is empty.
Functions ¶
func PathCompare ¶
Types ¶
type Builder ¶
type Builder[Ref any] struct { // contains filtered or unexported fields }
func NewBuilder ¶
func NewBuilder[Ref any](s WriteStorage[Ref], meanSize, maxSize int, seed *[16]byte) *Builder[Ref]
type Index ¶
type Index[Ref any] struct { Ref Ref // Adding Weight to an offset is the same as adding everything reachable from Ref to the offset. Weight Weight }
Index is a reference to a node and the sum of the change in path that would occur from concatenation the index.
type Iterator ¶
type Iterator[Ref any] struct { // contains filtered or unexported fields }
func NewIterator ¶
type Root ¶
type Root[Ref any] struct { Ref Ref `json:"ref"` Depth uint8 `json:"depth"` Weight Weight `json:"weight"` }
Root is a root of a Rope
type Storage ¶
type StreamEntry ¶
type StreamReader ¶
type StreamReader[Ref any] struct { // contains filtered or unexported fields }
func NewStreamReader ¶
func (*StreamReader[Ref]) Buffered ¶
func (sr *StreamReader[Ref]) Buffered() int
func (*StreamReader[Ref]) Next ¶
func (sr *StreamReader[Ref]) Next(ctx context.Context, ent *StreamEntry) error
func (*StreamReader[Ref]) Peek ¶
func (sr *StreamReader[Ref]) Peek(ctx context.Context, ent *StreamEntry) error
type StreamWriter ¶
type StreamWriter[Ref any] struct { // contains filtered or unexported fields }
func NewStreamWriter ¶
func NewStreamWriter[Ref any](s WriteStorage[Ref], meanSize, maxSize int, seed *[16]byte, cb IndexCallback[Ref]) *StreamWriter[Ref]
func (*StreamWriter[Ref]) Append ¶
func (sw *StreamWriter[Ref]) Append(ctx context.Context, se StreamEntry) error
func (*StreamWriter[Ref]) Buffered ¶
func (sw *StreamWriter[Ref]) Buffered() int
type Weight ¶
type Weight []uint64
type WriteStorage ¶
func NewWriteStorage ¶
func NewWriteStorage(s cadata.Store) WriteStorage[cadata.ID]
Click to show internal directories.
Click to hide internal directories.