Documentation
¶
Index ¶
Constants ¶
View Source
const ( // JSONVersion1 is a enumeration of index-cache.json versions supported by Thanos. JSONVersion1 = iota + 1 )
Variables ¶
View Source
var NotFoundRange = index.Range{}
NotFoundRange is a range returned by PostingsOffset when there is no posting for given name and value pairs. Has to be default value of index.Range.
Functions ¶
Types ¶
type JSONReader ¶
type JSONReader struct {
// contains filtered or unexported fields
}
JSONReader is a reader based on index-cache.json files.
func NewJSONReader ¶
func (*JSONReader) IndexVersion ¶
func (r *JSONReader) IndexVersion() int
func (*JSONReader) LabelNames ¶
func (r *JSONReader) LabelNames() []string
LabelNames returns a list of label names.
func (*JSONReader) LabelValues ¶
func (r *JSONReader) LabelValues(name string) []string
LabelValues returns label values for single name.
func (*JSONReader) LookupSymbol ¶
func (r *JSONReader) LookupSymbol(o uint32) (string, error)
func (*JSONReader) PostingsOffset ¶
func (r *JSONReader) PostingsOffset(name, value string) index.Range
type Reader ¶
type Reader interface { IndexVersion() int // TODO(bwplotka): Move to PostingsOffsets(name string, value ...string) []index.Range and benchmark. PostingsOffset(name string, value string) index.Range LookupSymbol(o uint32) (string, error) LabelValues(name string) []string LabelNames() []string }
Reader is an interface allowing to read essential, minimal number of index entries from the small portion of index file called header.
Click to show internal directories.
Click to hide internal directories.