rds

package
v0.0.0-...-c85406d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package rds implements methods to retrieve RDS information

Index

Constants

View Source
const (
	InstanceStatusAvailable                int    = 1
	InstanceStatusBackingUp                int    = 2
	InstanceStatusStarting                 int    = 3
	InstanceStatusModifying                int    = 4
	InstanceStatusStopped                  int    = 0
	InstanceStatusUnknown                  int    = -1
	InstanceStatusStopping                 int    = -2
	InstanceStatusCreating                 int    = -3
	InstanceStatusDeleting                 int    = -4
	NoPendingMaintenanceOperation          string = "no"
	UnknownMaintenanceOperation            string = "unknown"
	UnscheduledPendingMaintenanceOperation string = "pending"
	AutoAppliedPendingMaintenanceOperation string = "auto-applied"
	ForcedPendingMaintenanceOperation      string = "forced"
)

Variables

This section is empty.

Functions

func GetDBIdentifierFromARN

func GetDBIdentifierFromARN(arn string) string

GetDBIdentifierFromARN returns instance identifier from its ARN

func GetDBInstanceStatusCode

func GetDBInstanceStatusCode(status string) int

GetDBInstanceStatusCode returns instance status numeric code

func ThresholdValue

func ThresholdValue(min int64, value int64, max int64) int64

Types

type Configuration

type Configuration struct {
	CollectLogsSize     bool
	CollectMaintenances bool
}

type Metrics

type Metrics struct {
	Instances map[string]RdsInstanceMetrics
}

type RDSFetcher

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

func NewFetcher

func NewFetcher(ctx context.Context, client RDSClient, configuration Configuration) RDSFetcher

func (*RDSFetcher) GetInstancesMetrics

func (r *RDSFetcher) GetInstancesMetrics() (Metrics, error)

func (*RDSFetcher) GetStatistics

func (r *RDSFetcher) GetStatistics() Statistics

type RdsInstanceMetrics

type RdsInstanceMetrics struct {
	Arn                              string
	Engine                           string
	EngineVersion                    string
	DBInstanceClass                  string
	DbiResourceID                    string
	StorageType                      string
	AllocatedStorage                 int64
	StorageThroughput                int64
	MaxAllocatedStorage              int64
	MaxIops                          int64
	LogFilesSize                     *int64
	PendingMaintenanceAction         string
	PendingModifiedValues            bool
	BackupRetentionPeriod            int32
	Status                           int
	DeletionProtection               bool
	PubliclyAccessible               bool
	PerformanceInsightsEnabled       bool
	MultiAZ                          bool
	IAMDatabaseAuthenticationEnabled bool
	Role                             string
	SourceDBInstanceIdentifier       string
	CACertificateIdentifier          string
	CertificateValidTill             *time.Time
	Age                              *float64
	Tags                             map[string]string
}

type Statistics

type Statistics struct {
	RdsAPICall float64
}

Directories

Path Synopsis
Package mocks contains mock for RDS client
Package mocks contains mock for RDS client

Jump to

Keyboard shortcuts

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