adeptersinterfaces

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuroraHardwareState

type AuroraHardwareState struct {
	TotalMemoryBytes int64
	NumCPUs          int
	LastChecked      time.Time
}

type AuroraPerformanceInsightsState

type AuroraPerformanceInsightsState struct {
	Enabled     bool
	ResourceID  string
	LastChecked time.Time
}

type AuroraRDSAdapter

type AuroraRDSAdapter interface {
	PostgreSQLAdapter
	GetPIClient() *pi.Client
	GetEC2Client() *ec2.Client
	GetRDSClient() *rds.Client
	GetCWClient() *cloudwatch.Client
	GetAuroraRDSConfig() *AuroraRDSConfig
	GetEC2InstanceTypeInfo() (*ec2types.InstanceTypeInfo, error)
	GetAuroraState() *AuroraRDSState
}

type AuroraRDSConfig

type AuroraRDSConfig struct {
	AWSAccessKey          string `mapstructure:"AWS_ACCESS_KEY_ID"`
	AWSSecretAccessKey    string `mapstructure:"AWS_SECRET_ACCESS_KEY"`
	AWSRegion             string `mapstructure:"AWS_REGION" validate:"required"`
	RDSDatabaseIdentifier string `mapstructure:"RDS_DATABASE_IDENTIFIER" validate:"required"`
	RDSParameterGroupName string `mapstructure:"RDS_PARAMETER_GROUP_NAME" validate:"required"`
}

type AuroraRDSState

type AuroraRDSState struct {
	LastAppliedConfig   time.Time
	PerformanceInsights *AuroraPerformanceInsightsState
	Hardware            *AuroraHardwareState
	LastGuardrailCheck  time.Time
}

type DockerAdapter

type DockerAdapter interface {
	PostgreSQLAdapter
	GetContainerName() string
	GetDockerClient() *client.Client
}

type PostgreSQLAdapter

type PostgreSQLAdapter interface {
	Logger() *logrus.Logger
	PGDriver() *pgPool.Pool
	APIClient() *retryablehttp.Client
}

PostgreSQLAdapter is a struct that embeds the CommonAgent and adds a PGDriver. This is used by all the PostgreSQL adapters.

Jump to

Keyboard shortcuts

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