validator

package
v2.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KnownValidators added in v2.7.0

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

Types

type MetricWithVectorSelector added in v2.7.0

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 added in v2.10.0

type SourceTenantMetrics struct {
	Regexp      string `yaml:"regexp"`
	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