aws

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SelectorKeys = []string{
	"aws_arn",
}

SelectorKeys - a list of all supported AWS specific selector keys

Functions

This section is empty.

Types

type ApiGateway added in v0.10.0

type ApiGateway struct{}

func (*ApiGateway) Dimension added in v0.10.0

func (agw *ApiGateway) Dimension(arn arn.ARN) (types.Dimension, error)

func (*ApiGateway) GetErrorRateMetricDataInput added in v0.10.0

func (agw *ApiGateway) GetErrorRateMetricDataInput(arn arn.ARN, from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

func (*ApiGateway) GetLatencyAboveThresholdPerMin added in v0.11.0

func (agw *ApiGateway) GetLatencyAboveThresholdPerMin(
	arn arn.ARN, from, to time.Time, threshold float64) (*cloudwatch.GetMetricDataInput, error)

func (*ApiGateway) GetLatencyMetricDataInput added in v0.10.0

func (agw *ApiGateway) GetLatencyMetricDataInput(arn arn.ARN, from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

func (*ApiGateway) Namespace added in v0.10.0

func (agw *ApiGateway) Namespace() string

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) Close added in v0.13.1

func (cw *AwsCloudWatch) Close() error

Nothing to do for AWS... We don't want to close anything as providers are cached.

func (*AwsCloudWatch) Get99PercentLatencyMetricForResource

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

func (*AwsCloudWatch) GetAvailabilityPercentage added in v0.11.0

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

func (*AwsCloudWatch) GetErrorPercentageMetricForResource

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

func (*AwsCloudWatch) GetLatencyAboveThresholdPercentage added in v0.11.0

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

func (*AwsCloudWatch) ResourceFromSelector added in v0.18.0

func (cw *AwsCloudWatch) ResourceFromSelector(s entities.Selector) string

ResourceFromSelector - identifies the resource ID given a selector.

type AwsCloudWatchClient

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

type AwsMetricsProvider added in v0.10.0

type AwsMetricsProvider interface {
	Namespace() string
	Dimension(arn.ARN) (types.Dimension, error)
	GetErrorRateMetricDataInput(arn.ARN, time.Time, time.Time) (*cloudwatch.GetMetricDataInput, error)
	GetLatencyMetricDataInput(arn.ARN, time.Time, time.Time) (*cloudwatch.GetMetricDataInput, error)
	GetLatencyAboveThresholdPerMin(arn.ARN, time.Time, time.Time, float64) (*cloudwatch.GetMetricDataInput, error)
}

type AwsResource

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

func (*AwsResource) IsSupportedService

func (r *AwsResource) IsSupportedService() bool

IsSupportedService indicates wether the resource is supported for metrics retrieval

func (*AwsResource) MetricProvider added in v0.10.0

func (r *AwsResource) MetricProvider() (provider AwsMetricsProvider, err error)

type ElasticLoadBalancer added in v0.10.0

type ElasticLoadBalancer struct{}

func (*ElasticLoadBalancer) Dimension added in v0.10.0

func (elb *ElasticLoadBalancer) Dimension(arn arn.ARN) (types.Dimension, error)

func (*ElasticLoadBalancer) GetErrorRateMetricDataInput added in v0.10.0

func (elb *ElasticLoadBalancer) GetErrorRateMetricDataInput(arn arn.ARN, from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

func (*ElasticLoadBalancer) GetLatencyAboveThresholdPerMin added in v0.11.0

func (elb *ElasticLoadBalancer) GetLatencyAboveThresholdPerMin(
	arn arn.ARN, from, to time.Time, threshold float64) (*cloudwatch.GetMetricDataInput, error)

func (*ElasticLoadBalancer) GetLatencyMetricDataInput added in v0.10.0

func (elb *ElasticLoadBalancer) GetLatencyMetricDataInput(arn arn.ARN, from, to time.Time) (*cloudwatch.GetMetricDataInput, error)

func (*ElasticLoadBalancer) Namespace added in v0.10.0

func (elb *ElasticLoadBalancer) Namespace() string

Jump to

Keyboard shortcuts

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