model

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPeriodSeconds = int64(300)
	DefaultLengthSeconds = int64(300)
	DefaultDelaySeconds  = int64(300)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudwatchData

type CloudwatchData struct {
	ID                      *string
	MetricID                *string
	Metric                  *string
	Namespace               *string
	Statistics              []string
	Points                  []*cloudwatch.Datapoint
	GetMetricDataPoint      *float64
	GetMetricDataTimestamps *time.Time
	NilToZero               *bool
	AddCloudwatchTimestamp  *bool
	CustomTags              []Tag
	Tags                    []Tag
	Dimensions              []*cloudwatch.Dimension
	Region                  *string
	AccountID               *string
	Period                  int64
}

CloudwatchData is an internal representation of a CloudWatch metric with attached data points, metric and resource information.

type ExportedTagsOnMetrics

type ExportedTagsOnMetrics map[string][]string

type LabelSet

type LabelSet map[string]struct{}

type Tag

type Tag struct {
	Key   string `yaml:"key"`
	Value string `yaml:"value"`
}

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 []Tag
}

TaggedResource is an AWS resource with tags

func (TaggedResource) FilterThroughTags

func (r TaggedResource) FilterThroughTags(filterTags []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 ExportedTagsOnMetrics) []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).

Jump to

Keyboard shortcuts

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