Documentation
¶
Overview ¶
Package seriestable stores immutable identity-only runs under the engine's catalog.
Index ¶
- Constants
- Variables
- type Builder
- func (b *Builder) Add(id signal.SeriesID, s signal.Series) error
- func (b *Builder) AddBorrowed(ref int) error
- func (b *Builder) AddView(view series.View, i int) error
- func (b *Builder) Bytes() int64
- func (b *Builder) Count() int
- func (b *Builder) EncodedBound() int64
- func (b *Builder) StreamingDirectoryBytes() int64
- func (b *Builder) WritePostingsSpill(ctx context.Context, be backend.Backend, key string) error
- type IDCache
- type Iterator
- type Reader
- func (r *Reader) Close() error
- func (r *Reader) HasID(id signal.SeriesID) (bool, error)
- func (r *Reader) IDs(ctx context.Context) postings.Postings
- func (r *Reader) LookupOrdinal(id signal.SeriesID, ordinal uint32) ([]byte, error)
- func (r *Reader) LookupRaw(id signal.SeriesID) ([]byte, bool, error)
- func (r *Reader) Resolve(matchers []fetch.Matcher) (*Iterator, error)
- func (r *Reader) StreamPages()
- type Run
- func Open(ctx context.Context, be backend.Backend, prefix string, expected ...[32]byte) (*Run, error)
- func OpenWithIDCache(ctx context.Context, be backend.Backend, prefix string, cache *IDCache, ...) (*Run, error)
- func Write(ctx context.Context, be backend.Backend, prefix string, b *Builder) (*Run, error)
- func WriteContiguous(ctx context.Context, be backend.Backend, prefix string, view series.View, ...) (*Run, error)
- func WriteOrdinalMerge(ctx context.Context, be backend.Backend, prefix string, count int, ...) (*Run, error)
- func WriteWithIDCache(ctx context.Context, be backend.Backend, prefix string, b *Builder, ...) (*Run, error)
- func (r *Run) Close() error
- func (r *Run) Count() uint32
- func (r *Run) Digest() [32]byte
- func (r *Run) Iterate(ctx context.Context) (*Iterator, error)
- func (r *Run) MaxCanonicalBytes() int64
- func (r *Run) MaxPageBytes() int64
- func (r *Run) NewReader(ctx context.Context) (*Reader, error)
- func (r *Run) PostingIndex() *seriesindex.Index
- func (r *Run) ReaderContext(ctx context.Context) context.Context
- func (r *Run) Resolve(ctx context.Context, matchers []fetch.Matcher) (*Iterator, error)
Constants ¶
const IDColumn = "series"
IDColumn is the sole physical column in a metadata run.
Variables ¶
var ErrClosed = errors.New("seriestable: closed run")
ErrClosed rejects new operations after a run is retired.
var ErrCorrupt = errors.Wrap(seriesindex.ErrCorrupt, "series table")
ErrCorrupt identifies an invalid metadata run.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder owns sorted, distinct canonical identities; it carries no sample metadata.
func NewBorrowedBuilder ¶
NewBorrowedBuilder builds postings while borrowing descriptors from a pinned view.
func (*Builder) AddBorrowed ¶
AddBorrowed appends an ordered descriptor reference from the pinned view.
func (*Builder) AddView ¶
AddView copies a descriptor from a validated registry in canonical-ID order.
func (*Builder) EncodedBound ¶
EncodedBound bounds buffered output before compression.
func (*Builder) StreamingDirectoryBytes ¶
StreamingDirectoryBytes bounds the index directory when pages are streamed.
type IDCache ¶
type IDCache struct {
// contains filtered or unexported fields
}
IDCache retains byte-bounded routing filters and validated ID arrays.
func NewIDCache ¶
NewIDCache creates an empty cache; a nonpositive limit disables retention.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator yields sorted canonical IDs and borrowed descriptors until Close.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader owns bounded page scratch for one operation. It is not concurrent-safe.
func (*Reader) LookupOrdinal ¶
LookupOrdinal reads a descriptor at a known position and checks its full ID.
func (*Reader) LookupRaw ¶
LookupRaw returns a borrowed descriptor, valid until the next lookup or Close.
func (*Reader) Resolve ¶
Resolve creates an independently owned iterator using this operation's context.
func (*Reader) StreamPages ¶
func (r *Reader) StreamPages()
StreamPages uses operation-local page buffers for ordered descriptor access.
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run retains immutable metadata only. The engine owns catalog and object reclamation.
func Open ¶
func Open(ctx context.Context, be backend.Backend, prefix string, expected ...[32]byte) (*Run, error)
Open validates a run and optionally checks its catalog-bound manifest digest.
func OpenWithIDCache ¶
func OpenWithIDCache(ctx context.Context, be backend.Backend, prefix string, cache *IDCache, expected ...[32]byte) (*Run, error)
OpenWithIDCache retains validated IDs within cache's separate memory budget.
func WriteContiguous ¶
func WriteContiguous(ctx context.Context, be backend.Backend, prefix string, view series.View, refs []uint32, inputs []*seriesindex.PostingsSpill, cache *IDCache, ) (*Run, error)
WriteContiguous writes one immutable run from bounded, private postings spills.
func WriteOrdinalMerge ¶
func WriteOrdinalMerge(ctx context.Context, be backend.Backend, prefix string, count int, merge *seriesindex.PostingMerge, idAt func(int) signal.SeriesID, rawAt func(int) ([]byte, error), cache *IDCache, ) (*Run, error)
WriteOrdinalMerge writes a descriptor run from pinned source ordinals.
func WriteWithIDCache ¶
func WriteWithIDCache(ctx context.Context, be backend.Backend, prefix string, b *Builder, cache *IDCache) (*Run, error)
WriteWithIDCache writes a run and retains its IDs within cache's memory budget.
func (*Run) Close ¶
Close refuses new readers and retires retained handles after active operations finish.
func (*Run) MaxCanonicalBytes ¶
MaxCanonicalBytes is the maximum canonical record size.
func (*Run) MaxPageBytes ¶
MaxPageBytes bounds one index cursor's scratch.
func (*Run) PostingIndex ¶
func (r *Run) PostingIndex() *seriesindex.Index
PostingIndex exposes the immutable index while the caller pins the run.
func (*Run) ReaderContext ¶
ReaderContext binds reads to this run's retained immutable-file generation.