labelset

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelSet

type LabelSet struct {
	model.LabelSet
	// contains filtered or unexported fields
}

LabelSet wraps a model.LabelSet together with its fingerprint, so that consumers which already know the fingerprint (for example because they hold the alert it came from) do not need to hash the labels again. The fingerprint is set at construction time and the labels must not be modified afterwards.

func FromModel

func FromModel(ls model.LabelSet) LabelSet

FromModel returns a LabelSet wrapping ls, hashing it once to compute the fingerprint.

func New

New returns a LabelSet wrapping ls with fp as its fingerprint. The fingerprint of ls must be fp.

func (LabelSet) Fingerprint

func (l LabelSet) Fingerprint() model.Fingerprint

Fingerprint returns the fingerprint computed at construction time.

Jump to

Keyboard shortcuts

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