labelstore

package
v0.39.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "labelstore"

Variables

This section is empty.

Functions

func New

func New(l log.Logger, r prometheus.Registerer) *service

Types

type Arguments

type Arguments struct{}

type LabelStore

type LabelStore interface {

	// GetOrAddLink returns the global id for the values, if none found one will be created based on the lbls.
	GetOrAddLink(componentID string, localRefID uint64, lbls labels.Labels) uint64

	// GetOrAddGlobalRefID finds or adds a global id for the given label map.
	GetOrAddGlobalRefID(l labels.Labels) uint64

	// GetGlobalRefID returns the global id for a component and the local id. Returns 0 if nothing found.
	GetGlobalRefID(componentID string, localRefID uint64) uint64

	// GetLocalRefID gets the mapping from global to local id specific to a component. Returns 0 if nothing found.
	GetLocalRefID(componentID string, globalRefID uint64) uint64

	// AddStaleMarker adds a stale marker to a reference, that reference will then get removed on the next check.
	AddStaleMarker(globalRefID uint64, l labels.Labels)

	// RemoveStaleMarker removes the stale marker for a reference, keeping it around.
	RemoveStaleMarker(globalRefID uint64)

	// CheckAndRemoveStaleMarkers identifies any series with a stale marker and removes those entries from the LabelStore.
	CheckAndRemoveStaleMarkers()
}

Jump to

Keyboard shortcuts

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