awsclient

package
v0.0.0-...-b759b8c Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 16 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
	GetTransitGatewaysCount(ctx context.Context, input *ec2.DescribeTransitGatewaysInput) (int, error)

	//RDS
	DescribeDBLogFilesAll(ctx context.Context, instanceId string) ([]*rds.DescribeDBLogFilesOutput, error)
	DescribePendingMaintenanceActionsAll(ctx context.Context) ([]rds_types.ResourcePendingMaintenanceActions, error)
	DescribeDBInstancesAll(ctx context.Context) ([]rds_types.DBInstance, error)

	// Service Quota
	GetServiceQuota(ctx context.Context, input *servicequotas.GetServiceQuotaInput, optFns ...func(*servicequotas.Options)) (*servicequotas.GetServiceQuotaOutput, error)

	//route53
	ListHostedZonesAll(ctx context.Context) ([]route53_types.HostedZone, error)
	GetHostedZoneLimit(ctx context.Context, input *route53.GetHostedZoneLimitInput, optFns ...func(*route53.Options)) (*route53.GetHostedZoneLimitOutput, error)

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

	// MSK
	ListClustersAll(ctx context.Context) ([]kafka_types.ClusterInfo, error)

	// IAM
	GetAccountSummary(ctx context.Context, input *iam.GetAccountSummaryInput, optFns ...func(*iam.Options)) (*iam.GetAccountSummaryOutput, error)
}

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

func NewClient

func NewClient(ctx context.Context) (Client, error)

Backwards compatibility function

func NewClientFromConfig

func NewClientFromConfig(cfg aws.Config) 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