validator

package
v3.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KnownValidators

func KnownValidators(scope config.ValidationScope, validatorNames []string) error

Types

type MetricWithVectorSelector

type MetricWithVectorSelector struct {
	VectorSelector *parser.VectorSelector
	Name           string
}

MetricWithVectorSelector is a struct that contains a metric name and a vector selector where it is used, to give a context, in the error messages.

type SourceTenantMetrics

type SourceTenantMetrics struct {
	Regexp         string `yaml:"regexp"`
	NegativeRegexp string `yaml:"negativeRegexp"`
	Description    string `yaml:"description"`
}

type Validator

type Validator interface {
	fmt.Stringer
	Validate(group unmarshaler.RuleGroup, rule rulefmt.Rule, prometheusClient *prometheus.Client) []error
}

func NewFromConfig

func NewFromConfig(scope config.ValidationScope, validatorConfig config.ValidatorConfig) (Validator, error)

Jump to

Keyboard shortcuts

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