mysql

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: 21 Imported by: 0

Documentation

Overview

Package mysql contains business logic of working with Remote MySQL instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Node    models.RemoteNode
	Service models.MySQLService
}

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, name, address string, port uint32, username, password string) (int32, error)

func (*Service) ApplyPrometheusConfiguration

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

func (*Service) List

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

func (*Service) Remove

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

func (*Service) Restore

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

Restore configuration from database.

type ServiceConfig

type ServiceConfig struct {
	MySQLdExporterPath 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