exclude

package
v3.24.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(group string, spec *definition.Spec, ent *integration.Entity) bool

Func is a function that returns true if a particular metric (spec) should be excluded from being asserted on ent. If a Func returns true for a given group, metric (spec) and entity, Asserter will not fail even if the metric is not found.

func Dependent

func Dependent(dependencies map[string][]string) Func

Dependent receives a map between a metric name and other metric names that depend on it, and returns an Func that will exclude the dependencies if the dependent is not present.

func Exclude

func Exclude(funcs ...Func) Func

Exclude returns a Func that returns true if all the supplied ExcludeFuncs return true. Input ExcludeFuncs are evaluated in order, so this function makes easy to compose exclusion rules.

func Groups

func Groups(groups ...string) Func

Groups returns a Func that will exclude a metric if group matches the supplied group.

func Metrics

func Metrics(metricNames ...string) Func

Metrics returns a Func that excludes the specified metric names.

func Optional

func Optional() Func

Optional returns a Func that excludes metrics marked as Optional.

Jump to

Keyboard shortcuts

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