databasecenter

package
v0.0.0-...-ad6a373 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package databasecenter provides functionality to send metadata to Database Center.

Index

Constants

View Source
const (

	// SQLFlexInstanceIDLabelKey is the GCE VM label for the SQL Flex instance ID.
	SQLFlexInstanceIDLabelKey = "sql-flex-instance-id"
	// MajorVersionKey is the key for the major version in metrics.
	MajorVersionKey = "major_version"
	// MinorVersionKey is the key for the minor version in metrics.
	MinorVersionKey = "minor_version"
	// NoRootPasswordKey is the key for the no root password signal in metrics.
	NoRootPasswordKey = "no_root_password"
	// ExposedToPublicAccessKey is the key for the exposed to public access signal in metrics.
	ExposedToPublicAccessKey = "exposed_to_public_access"
	// UnencryptedConnectionsKey is the key for the unencrypted connections signal in metrics.
	UnencryptedConnectionsKey = "unencrypted_connections"
	// DatabaseAuditingDisabledKey is the key for the database auditing disabled signal in metrics.
	DatabaseAuditingDisabledKey = "database_auditing_disabled"
	// LastBackupOldKey is the key for the last backup old signal in metrics.
	LastBackupOldKey = "last_backup_old"
	// NotProtectedByAutomaticFailoverKey is the key for the not protected by automatic failover signal in metrics.
	NotProtectedByAutomaticFailoverKey = "not_protected_by_automatic_failover"
	// NoAutomatedBackupPolicyKey is the key for the no automated backup policy signal in metrics.
	NoAutomatedBackupPolicyKey = "no_automated_backup_policy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SendMetadataToDatabaseCenter(ctx context.Context, metrics DBCenterMetrics) error
}

Client for sending metadata to database center.

func NewClient

func NewClient(config *configpb.Configuration, commClient CommunicationClient) Client

NewClient creates a new database center client.

type CommunicationClient

type CommunicationClient interface {
	EstablishACSConnection(ctx context.Context, endpoint string, channel string) (*client.Connection, error)
	SendAgentMessage(ctx context.Context, agentType string, messageType string, msg *anypb.Any, conn *client.Connection) error
}

CommunicationClient is an interface for communication client.

type DBCenterMetrics

type DBCenterMetrics struct {
	EngineType EngineType
	Metrics    map[string]string
}

DBCenterMetrics is a struct for database center metrics.

type EngineType

type EngineType string

EngineType is an enum for the type of database engine.

const (
	// UNKNOWN  engine type.
	UNKNOWN EngineType = "UNKNOWN"
	// MYSQL engine type.
	MYSQL EngineType = "MYSQL"
	// POSTGRES engine type.
	POSTGRES EngineType = "POSTGRES"
	// SQLSERVER engine type.
	SQLSERVER EngineType = "SQLSERVER"
)

Jump to

Keyboard shortcuts

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