associator

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 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 Associator

type Associator map[string]valueToResource

metricsToResourceAssociator contains for each dimension, the matched values and resources.

func NewAssociator

func NewAssociator(dimensionRegexps []*regexp.Regexp, resources []*model.TaggedResource) Associator

NewAssociator creates a new metricsToResourceAssociator given a set of dimensions regexs that can extract dimensions from a resource ARN, and a set of resources from which to extract.

func (Associator) AssociateMetricToResource

func (asoc Associator) AssociateMetricToResource(cwMetric *model.Metric) (*model.TaggedResource, bool)

AssociateMetricToResource finds, for a given model.Metric, the resource that matches the better. If no match is found, nil is returned. Also, there are some conditions where the metric shouldn't be considered, and that is dictated by the skip return value.

Jump to

Keyboard shortcuts

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