util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// rcloneConfigFile represents the path to the file that contains rclon
	// configs. This path should be the same as defined in docker entrypoint
	// script from mysql-helper/docker-entrypoint.sh. /etc/rclone.conf
	RcloneConfigFile = "/etc/rclone.conf"
)

Variables

View Source
var (
	// BackupPort is the port on which xtrabackup expose backups, 3306
	BackupPort = strconv.Itoa(mysqlcluster.HelperXtrabackupPort)

	// MysqlPort represents port on wich mysql works
	MysqlPort = strconv.Itoa(mysqlcluster.MysqlPort)

	// ConfigDir is the mysql configs path, /etc/mysql
	ConfigDir = mysqlcluster.ConfVolumeMountPath

	// ConfDPath is /etc/mysql/conf.d
	ConfDPath = mysqlcluster.ConfDPath

	// MountConfigDir is the mounted configs that needs processing
	MountConfigDir = mysqlcluster.ConfMapVolumeMountPath

	// DataDir is the mysql data. /var/lib/mysql
	DataDir = mysqlcluster.DataVolumeMountPath

	// ToolsDbName is the name of the tools table
	ToolsDbName = "tools"
	// ToolsTableName is the name of the init table
	ToolsInitTableName = "init"

	// UtilityUser is the name of the percona utility user.
	UtilityUser = "sys_utility_helper"

	// OrcTopologyDir contains the path where the secret with orc credentails is
	// mounted.
	OrcTopologyDir = mysqlcluster.OrcTopologyDir

	NameOfStatefulSet = api.StatefulSet

	HelperProbePath = mysqlcluster.HelperProbePath
	HelperProbePort = mysqlcluster.HelperProbePort
)

Functions

func CopyFile

func CopyFile(src, dst string) error

CopyFile the src file to dst. Any existing file will be overwritten and will not copy file attributes.

func GetClusterName

func GetClusterName() string

func GetExporterPass

func GetExporterPass() string

GetExporterPass returns the replication password from env variable MYSQL_METRICS_EXPORTER_PASSWORD

func GetExporterUser

func GetExporterUser() string

GetExporterUser returns the replication user name from env variable MYSQL_METRICS_EXPORTER_USER

func GetHostFor

func GetHostFor(id int) string

GetHostFor returns the host for given server id

func GetHostname

func GetHostname() string

func GetInitBucket

func GetInitBucket() string

GetInitBucket returns the bucket uri from env variable INIT_BUCKET_URI

func GetMasterHost

func GetMasterHost() string

GetMasterHost returns the master host

func GetMySQLConnectionString added in v0.1.1

func GetMySQLConnectionString() (dsn string, err error)

func GetNamespace added in v0.1.1

func GetNamespace() string

func GetOrcPass

func GetOrcPass() string

GetOrcTopologyPass returns the orchestrator topology passowrd from env variable MYSQL_ORC_TOPOLOGY_PASSWORD

func GetOrcUser

func GetOrcUser() string

GetOrcTopologyUser returns the orchestrator topology user from env variable MYSQL_ORC_TOPOLOGY_USER

func GetReplPass

func GetReplPass() string

GetReplPass returns the replication password from env variable MYSQL_REPLICATION_PASSWORD

func GetReplUser

func GetReplUser() string

GetReplUser returns the replication user name from env variable MYSQL_REPLICATION_USER

func GetServerId

func GetServerId() int

func GetServiceName added in v0.1.1

func GetServiceName() string

func NodeRole

func NodeRole() string

func RunQuery

func RunQuery(q string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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