Versions in this module Expand all Collapse all v0 v0.37.1 Jun 6, 2022 v0.37.0 Jun 6, 2022 Changes in this version + const FormatV1 + const FormatV2 + const HeaderLen + const MagicIndex + func AllPostingsKey() (name, value string) + func ExpandPostings(p Postings) (res []storage.SeriesRef, err error) + func FindIntersectingPostings(p Postings, candidates []Postings) (indexes []int, err error) + func ReadOffsetTable(bs ByteSlice, off uint64, f func([]string, uint64, int) error) error + type ByteSlice interface + Len func() int + Range func(start, end int) []byte + type Decoder struct + LookupSymbol func(uint32) (string, error) + func (dec *Decoder) LabelNamesOffsetsFor(b []byte) ([]uint32, error) + func (dec *Decoder) LabelValueFor(b []byte, label string) (string, error) + func (dec *Decoder) Postings(b []byte) (int, Postings, error) + func (dec *Decoder) Series(b []byte, lbls *labels.Labels, chks *[]chunks.Meta) error + type FileWriter struct + func NewFileWriter(name string) (*FileWriter, error) + func (fw *FileWriter) AddPadding(size int) error + func (fw *FileWriter) Close() error + func (fw *FileWriter) Flush() error + func (fw *FileWriter) Pos() uint64 + func (fw *FileWriter) Remove() error + func (fw *FileWriter) Write(bufs ...[]byte) error + func (fw *FileWriter) WriteAt(buf []byte, pos uint64) error + type ListPostings struct + func (it *ListPostings) At() storage.SeriesRef + func (it *ListPostings) Err() error + func (it *ListPostings) Next() bool + func (it *ListPostings) Seek(x storage.SeriesRef) bool + type MemPostings struct + func NewMemPostings() *MemPostings + func NewUnorderedMemPostings() *MemPostings + func (p *MemPostings) Add(id storage.SeriesRef, lset labels.Labels) + func (p *MemPostings) All() Postings + func (p *MemPostings) Delete(deleted map[storage.SeriesRef]struct{}) + func (p *MemPostings) EnsureOrder() + func (p *MemPostings) Get(name, value string) Postings + func (p *MemPostings) Iter(f func(labels.Label, Postings) error) error + func (p *MemPostings) LabelNames() []string + func (p *MemPostings) LabelValues(name string) []string + func (p *MemPostings) SortedKeys() []labels.Label + func (p *MemPostings) Stats(label string) *PostingsStats + func (p *MemPostings) Symbols() StringIter + type Postings interface + At func() storage.SeriesRef + Err func() error + Next func() bool + Seek func(v storage.SeriesRef) bool + func EmptyPostings() Postings + func ErrPostings(err error) Postings + func Intersect(its ...Postings) Postings + func Merge(its ...Postings) Postings + func NewListPostings(list []storage.SeriesRef) Postings + func Without(full, drop Postings) Postings + type PostingsStats struct + CardinalityLabelStats []Stat + CardinalityMetricsStats []Stat + LabelValuePairsStats []Stat + LabelValueStats []Stat + NumLabelPairs int + type Range struct + End int64 + Start int64 + type Reader struct + func NewFileReader(path string) (*Reader, error) + func NewReader(b ByteSlice) (*Reader, error) + func (r *Reader) Close() error + func (r *Reader) LabelNames(matchers ...*labels.Matcher) ([]string, error) + func (r *Reader) LabelNamesFor(ids ...storage.SeriesRef) ([]string, error) + func (r *Reader) LabelValueFor(id storage.SeriesRef, label string) (string, error) + func (r *Reader) LabelValues(name string, matchers ...*labels.Matcher) ([]string, error) + func (r *Reader) Postings(name string, values ...string) (Postings, error) + func (r *Reader) PostingsRanges() (map[labels.Label]Range, error) + func (r *Reader) Series(id storage.SeriesRef, lbls *labels.Labels, chks *[]chunks.Meta) error + func (r *Reader) Size() int64 + func (r *Reader) SortedLabelValues(name string, matchers ...*labels.Matcher) ([]string, error) + func (r *Reader) SortedPostings(p Postings) Postings + func (r *Reader) SymbolTableSize() uint64 + func (r *Reader) Symbols() StringIter + func (r *Reader) Version() int + type Stat struct + Count uint64 + Name string + type StringIter interface + At func() string + Err func() error + Next func() bool + func NewStringListIter(s []string) StringIter + type Symbols struct + func NewSymbols(bs ByteSlice, version, off int) (*Symbols, error) + func (s Symbols) Iter() StringIter + func (s Symbols) Lookup(o uint32) (string, error) + func (s Symbols) ReverseLookup(sym string) (uint32, error) + func (s Symbols) Size() int + type TOC struct + LabelIndices uint64 + LabelIndicesTable uint64 + Postings uint64 + PostingsTable uint64 + Series uint64 + Symbols uint64 + func NewTOCFromByteSlice(bs ByteSlice) (*TOC, error) + type Writer struct + Version int + func NewWriter(ctx context.Context, fn string) (*Writer, error) + func (w *Writer) AddSeries(ref storage.SeriesRef, lset labels.Labels, chunks ...chunks.Meta) error + func (w *Writer) AddSymbol(sym string) error + func (w *Writer) Close() error