aws

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsCloudWatch

type AwsCloudWatch struct{}

func NewAwsCloudWatch

func NewAwsCloudWatch() (cw *AwsCloudWatch, err error)

NewAwsCloudWatch is the factory function for AWS cloud watch metric provider

func (*AwsCloudWatch) Get99PercentLatencyMetricForResource

func (cw *AwsCloudWatch) Get99PercentLatencyMetricForResource(resourceID string, from, to time.Time) (float64, error)

func (*AwsCloudWatch) GetErrorPercentageMetricForResource

func (cw *AwsCloudWatch) GetErrorPercentageMetricForResource(resourceID string, from, to time.Time) (float64, error)

type AwsCloudWatchClient

type AwsCloudWatchClient interface {
	GetMetricData(ctx context.Context, params *cloudwatch.GetMetricDataInput,
		optFns ...func(*cloudwatch.Options)) (*cloudwatch.GetMetricDataOutput, error)
}

type AwsResource

type AwsResource struct {
	// contains filtered or unexported fields
}

func (*AwsResource) GetErrorRateMetricDataInput

func (r *AwsResource) GetErrorRateMetricDataInput(from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

GetErrorRateMetricDataInput retuns the MetricDataInput struct for querying with cloud watch API. It must ONLY return a single value for the required 'error_rate_percent' metric ID This function handles data input depending on different targeted AWS Service

func (*AwsResource) GetLatencyMetricDataInput

func (r *AwsResource) GetLatencyMetricDataInput(from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

func (*AwsResource) IsSupportedService

func (r *AwsResource) IsSupportedService() bool

IsSupportedService indicates wether the resource is supported for metrics retrieval

func (*AwsResource) MetricNamespace

func (r *AwsResource) MetricNamespace() string

Jump to

Keyboard shortcuts

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