Documentation ¶
Index ¶
- type InvertedIndex
- func (ii *InvertedIndex) Add(labels []cortexpb.LabelAdapter, fp model.Fingerprint) labels.Labels
- func (ii *InvertedIndex) Delete(labels labels.Labels, fp model.Fingerprint)
- func (ii *InvertedIndex) LabelNames() []string
- func (ii *InvertedIndex) LabelValues(name string) []string
- func (ii *InvertedIndex) Lookup(matchers []*labels.Matcher) []model.Fingerprint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvertedIndex ¶
type InvertedIndex struct {
// contains filtered or unexported fields
}
InvertedIndex implements a in-memory inverter index from label pairs to fingerprints. It is sharded to reduce lock contention on writes.
func (*InvertedIndex) Add ¶
func (ii *InvertedIndex) Add(labels []cortexpb.LabelAdapter, fp model.Fingerprint) labels.Labels
Add a fingerprint under the specified labels. NOTE: memory for `labels` is unsafe; anything retained beyond the life of this function must be copied
func (*InvertedIndex) Delete ¶
func (ii *InvertedIndex) Delete(labels labels.Labels, fp model.Fingerprint)
Delete a fingerprint with the given label pairs.
func (*InvertedIndex) LabelNames ¶
func (ii *InvertedIndex) LabelNames() []string
LabelNames returns all label names.
func (*InvertedIndex) LabelValues ¶
func (ii *InvertedIndex) LabelValues(name string) []string
LabelValues returns the values for the given label.
func (*InvertedIndex) Lookup ¶
func (ii *InvertedIndex) Lookup(matchers []*labels.Matcher) []model.Fingerprint
Lookup all fingerprints for the provided matchers.
Click to show internal directories.
Click to hide internal directories.