Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrateTagsToPrometheus ¶
func MigrateTagsToPrometheus(tagData []*TaggedResource, labelsSnakeCase bool, logger logging.Logger) []*promutil.PrometheusMetric
Types ¶
type TaggedResource ¶
type TaggedResource struct { // ARN is the unique AWS ARN (Amazon Resource Name) of the resource ARN string // Namespace identifies the resource type (e.g. EC2) Namespace string // Region is the AWS regions that the resource belongs to Region string // Tags is a set of tags associated to the resource Tags []model.Tag }
TaggedResource is an AWS resource with tags
func (TaggedResource) FilterThroughTags ¶
func (r TaggedResource) FilterThroughTags(filterTags []model.Tag) bool
filterThroughTags returns true if all filterTags match with tags of the TaggedResource, returns false otherwise.
func (TaggedResource) MetricTags ¶
func (r TaggedResource) MetricTags(tagsOnMetrics config.ExportedTagsOnMetrics) []model.Tag
MetricTags returns a list of tags built from the tags of TaggedResource, if there's a definition for its namespace in tagsOnMetrics.
Returned tags have as key the key from tagsOnMetrics, and as value the value from the corresponding tag of the resource, if it exists (otherwise an empty string).
type TagsInterface ¶
type TagsInterface struct { Client resourcegroupstaggingapiiface.ResourceGroupsTaggingAPIAPI AsgClient autoscalingiface.AutoScalingAPI APIGatewayClient apigatewayiface.APIGatewayAPI Ec2Client ec2iface.EC2API DmsClient databasemigrationserviceiface.DatabaseMigrationServiceAPI PrometheusClient prometheusserviceiface.PrometheusServiceAPI StoragegatewayClient storagegatewayiface.StorageGatewayAPI Logger logging.Logger }
func (TagsInterface) Get ¶
func (iface TagsInterface) Get(ctx context.Context, job *config.Job, region string) ([]*TaggedResource, error)
Click to show internal directories.
Click to hide internal directories.