Documentation
¶
Index ¶
- Variables
- func CopyAll(ctx context.Context, b *Builder, it Iterator) error
- func Get(ctx context.Context, s Store, x Root, key []byte) ([]byte, error)
- func GetF(ctx context.Context, s Store, x Root, key []byte, fn func([]byte) error) error
- func KeyAfter(x []byte) []byte
- func Populate(ctx context.Context, s Store, x Root, set stores.Set, ...) error
- func PrefixEnd(prefix []byte) []byte
- func Sync(ctx context.Context, dst, src Store, x Root, entryFn func(Entry) error) error
- type Builder
- type Entry
- type ID
- type Iterator
- type Mutation
- type Operator
- func (o *Operator) AddPrefix(x Root, prefix []byte) Root
- func (o *Operator) Concat(ctx context.Context, s cadata.Store, iters ...kvstreams.Iterator) (*Root, error)
- func (o *Operator) Delete(ctx context.Context, s cadata.Store, x Root, key []byte) (*Root, error)
- func (o *Operator) DeleteSpan(ctx context.Context, s cadata.Store, x Root, span Span) (*Root, error)
- func (o *Operator) Diff(ctx context.Context, s cadata.Store, left, right Root, span Span, ...) error
- func (o *Operator) ForEach(ctx context.Context, s Store, root Root, span Span, fn func(Entry) error) error
- func (o *Operator) Get(ctx context.Context, s cadata.Store, x Root, key []byte) ([]byte, error)
- func (o *Operator) GetF(ctx context.Context, s cadata.Store, x Root, key []byte, fn func([]byte) error) error
- func (o *Operator) MaxEntry(ctx context.Context, s cadata.Store, x Root, span Span) (*Entry, error)
- func (o *Operator) Mutate(ctx context.Context, s cadata.Store, x Root, mutations ...Mutation) (*Root, error)
- func (o *Operator) NewBuilder(s Store) *Builder
- func (o *Operator) NewEmpty(ctx context.Context, s cadata.Store) (*Root, error)
- func (o *Operator) NewIterator(s Store, root Root, span Span) Iterator
- func (o *Operator) Put(ctx context.Context, s cadata.Store, x Root, key, value []byte) (*Root, error)
- func (o *Operator) RemovePrefix(ctx context.Context, s cadata.Store, x Root, prefix []byte) (*Root, error)
- type Option
- type Ref
- type Root
- type Span
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFound = errors.Errorf("key not found") EOS = kvstreams.EOS )
Functions ¶
Types ¶
type Mutation ¶ added in v0.0.2
Mutation represents a declarative change to a Span of entries. The result of applying mutation is that
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
Operator holds common configuration for operations on gotkv instances. It has nothing to do with the state of a particular gotkv instance. It is NOT analagous to a collection object. It is safe for use by multiple goroutines.
func NewOperator ¶
func (*Operator) Concat ¶ added in v0.0.2
func (o *Operator) Concat(ctx context.Context, s cadata.Store, iters ...kvstreams.Iterator) (*Root, error)
Concat copies data from the iterators in order. If the iterators produce out of order keys concat errors.
func (*Operator) DeleteSpan ¶
func (*Operator) Mutate ¶ added in v0.0.2
func (o *Operator) Mutate(ctx context.Context, s cadata.Store, x Root, mutations ...Mutation) (*Root, error)
Mutate applies a batch of mutations to the tree x.
func (*Operator) NewBuilder ¶
func (*Operator) NewIterator ¶
type Option ¶
type Option func(op *Operator)
func WithAverageSize ¶
WithAverageSize sets the average size of blobs made by the operator
func WithDataOperator ¶
func WithMaxSize ¶
WithMaxSize sets the max size of blobs made by the operator
Click to show internal directories.
Click to hide internal directories.