rds

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package rds contains business logic of working with AWS RDS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Node    models.RDSNode
	Service models.RDSService
}

type InstanceID

type InstanceID struct {
	Region string
	Name   string // DBInstanceIdentifier
}

InstanceID uniquely identifies RDS instance. http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html Each DB instance has a DB instance identifier. This customer-supplied name uniquely identifies the DB instance when interacting with the Amazon RDS API and AWS CLI commands. The DB instance identifier must be unique for that customer in an AWS Region.

type Service

type Service struct {
	*ServiceConfig
	// contains filtered or unexported fields
}

Service is responsible for interactions with AWS RDS.

func NewService

func NewService(config *ServiceConfig) (*Service, error)

NewService creates a new service.

func (*Service) Add

func (svc *Service) Add(ctx context.Context, accessKey, secretKey string, id *InstanceID, username, password string) error

func (*Service) ApplyPrometheusConfiguration

func (svc *Service) ApplyPrometheusConfiguration(ctx context.Context, q *reform.Querier) error

func (*Service) Discover

func (svc *Service) Discover(ctx context.Context, accessKey, secretKey string) ([]Instance, error)

func (*Service) List

func (svc *Service) List(ctx context.Context) ([]Instance, error)

func (*Service) MySQLServiceFromRDSService added in v1.16.0

func (svc *Service) MySQLServiceFromRDSService(service *models.RDSService) *models.MySQLService

func (*Service) Remove

func (svc *Service) Remove(ctx context.Context, id *InstanceID) error

func (*Service) Restore added in v1.6.1

func (svc *Service) Restore(ctx context.Context, tx *reform.TX) error

Restore configuration from database.

type ServiceConfig

type ServiceConfig struct {
	MySQLdExporterPath    string
	RDSExporterPath       string
	RDSExporterConfigPath string

	Prometheus    *prometheus.Service
	Supervisor    services.Supervisor
	DB            *reform.DB
	PortsRegistry *ports.Registry
	QAN           *qan.Service
}

Jump to

Keyboard shortcuts

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