Documentation ¶
Index ¶
- func MarshalExtent(e *Extent) []byte
- func ParseExtentKey(x []byte) ([]byte, uint64, error)
- type Builder
- func (b *Builder) CopyExtent(ctx context.Context, ext *Extent, isShort bool) error
- func (b *Builder) CopyExtents(ctx context.Context, exts []*Extent) error
- func (b *Builder) CopyFrom(ctx context.Context, root Root, span Span) error
- func (b *Builder) Finish(ctx context.Context) (*Root, error)
- func (b *Builder) GetPrefix(out []byte) []byte
- func (b *Builder) IsFinished() bool
- func (b *Builder) Put(ctx context.Context, key, value []byte) error
- func (b *Builder) SetPrefix(prefix []byte) error
- func (b *Builder) Write(data []byte) (int, error)
- type Extent
- type Operator
- func (o *Operator) CreateExtents(ctx context.Context, ds cadata.Store, r io.Reader) ([]*Extent, error)
- func (op *Operator) MaxExtent(ctx context.Context, ms cadata.Store, root Root, span Span) ([]byte, *Extent, error)
- func (op *Operator) MinExtent(ctx context.Context, ms cadata.Store, root Root, span Span) ([]byte, *Extent, error)
- func (o *Operator) NewBuilder(ctx context.Context, ms, ds cadata.Store) *Builder
- func (o *Operator) NewReader(ctx context.Context, ms, ds cadata.Store, root Root, prefix []byte) (*Reader, error)
- func (o *Operator) SizeOf(ctx context.Context, ms cadata.Store, root Root, prefix []byte) (uint64, error)
- func (o *Operator) Splice(ctx context.Context, ms, ds cadata.Store, segs []Segment) (*Root, error)
- type Option
- type Reader
- type Ref
- type Root
- type Segment
- type Span
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalExtent ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder chunks large objects, stores them, and then writes extents to a gotkv instance.
func (*Builder) CopyExtent ¶
func (*Builder) CopyExtents ¶
CopyExtents copies multiple extents to the current object.
func (*Builder) GetPrefix ¶
GetPrefix appends the current prefix to out if it exists, or returns nil if it does not
func (*Builder) IsFinished ¶
type Extent ¶
Extent is a reference to data using the gdat.Ref type.
func ParseExtent ¶
func (*Extent) MarshalBinary ¶
func (*Extent) UnmarshalBinary ¶
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
func NewOperator ¶
func (*Operator) CreateExtents ¶
func (*Operator) MaxExtent ¶
func (op *Operator) MaxExtent(ctx context.Context, ms cadata.Store, root Root, span Span) ([]byte, *Extent, error)
maxEntry finds the maximum extent entry in root within span.
func (*Operator) NewBuilder ¶
type Option ¶
type Option func(o *Operator)
func WithChunking ¶
func WithChunking(flushBetween bool, fn func(onChunk chunking.ChunkHandler) *chunking.ContentDefined) Option
WithChunking sets the chunking strategy used by the Operator
func WithFilter ¶
WithFilter sets a filter function, so that the operator ignores any keys where fn(key) is false.
Click to show internal directories.
Click to hide internal directories.