index

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

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 New

func New() *InvertedIndex

New returns a new InvertedIndex.

func (*InvertedIndex) Add

Add a fingerprint under the specified labels.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL