awsclient

package
v0.0.0-...-9cbb2d8 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	//EC2
	DescribeTransitGatewaysWithContext(ctx aws.Context, input *ec2.DescribeTransitGatewaysInput, opts ...request.Option) (*ec2.DescribeTransitGatewaysOutput, error)

	//RDS
	DescribeDBInstancesPagesWithContext(ctx aws.Context, input *rds.DescribeDBInstancesInput, fn func(*rds.DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error
	DescribeDBLogFilesPagesWithContext(ctx aws.Context, input *rds.DescribeDBLogFilesInput, fn func(*rds.DescribeDBLogFilesOutput, bool) bool, opts ...request.Option) error
	DescribePendingMaintenanceActionsPagesWithContext(ctx aws.Context, input *rds.DescribePendingMaintenanceActionsInput, fn func(*rds.DescribePendingMaintenanceActionsOutput, bool) bool, opts ...request.Option) error
	DescribeDBLogFilesAll(ctx context.Context, instanceId string) ([]*rds.DescribeDBLogFilesOutput, error)
	DescribePendingMaintenanceActionsAll(ctx context.Context) ([]*rds.ResourcePendingMaintenanceActions, error)
	DescribeDBInstancesAll(ctx context.Context) ([]*rds.DBInstance, error)

	// Service Quota
	GetServiceQuotaWithContext(ctx aws.Context, input *servicequotas.GetServiceQuotaInput, opts ...request.Option) (*servicequotas.GetServiceQuotaOutput, error)

	//route53
	ListHostedZonesWithContext(ctx context.Context, input *route53.ListHostedZonesInput, opts ...request.Option) (*route53.ListHostedZonesOutput, error)
	GetHostedZoneLimitWithContext(ctx context.Context, input *route53.GetHostedZoneLimitInput, opts ...request.Option) (*route53.GetHostedZoneLimitOutput, error)

	// ElastiCache
	DescribeCacheClustersAll(ctx context.Context) ([]*elasticache.CacheCluster, error)

	// MSK
	ListClustersAll(ctx context.Context) ([]*kafka.ClusterInfo, error)
}

Client is a wrapper object for actual AWS SDK clients to allow for easier testing.

func NewClientFromSession

func NewClientFromSession(sess *session.Session) Client

type ExporterMetrics

type ExporterMetrics struct {
	APIRequestsCount float64
	APIErrorsCount   float64

	APIRequests *prometheus.Desc
	APIErrors   *prometheus.Desc
	// contains filtered or unexported fields
}

ExporterMetrics defines an instance of the exporter metrics

var AwsExporterMetrics *ExporterMetrics

func NewExporterMetrics

func NewExporterMetrics(namespace string) *ExporterMetrics

NewExporterMetrics creates a new exporter metrics instance

func (*ExporterMetrics) Collect

func (e *ExporterMetrics) Collect(ch chan<- prometheus.Metric)

Collect is used by the Prometheus client to collect and return the metrics values

func (*ExporterMetrics) Describe

func (e *ExporterMetrics) Describe(ch chan<- *prometheus.Desc)

Describe is used by the Prometheus client to return a description of the metrics

func (*ExporterMetrics) IncrementErrors

func (e *ExporterMetrics) IncrementErrors()

IncrementErrors increments the API requests error counter

func (*ExporterMetrics) IncrementRequests

func (e *ExporterMetrics) IncrementRequests()

IncrementRequests increments the API requests counter

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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