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.
Click to show internal directories.
Click to hide internal directories.