v0.8.3 Latest Latest

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 9 Imported by: 0




View Source
const (
	ExporterPasswordKey = "EXPORTER_PASSWORD"
	BackupPasswordKey   = "BACKUP_PASSWORD"


This section is empty.


This section is empty.


type MySQLPassword

type MySQLPassword struct {
	// contains filtered or unexported fields

MySQLPassword represents a set of passwords of MySQL users for MOCO

func NewMySQLPassword

func NewMySQLPassword() (*MySQLPassword, error)

NewMySQLPassword generates random passwords for NewMySQLPassword and return it.

func NewMySQLPasswordFromSecret

func NewMySQLPasswordFromSecret(secret *corev1.Secret) (*MySQLPassword, error)

NewMySQLPasswordFromSecret constructs MySQLPassword from Secret.

func (MySQLPassword) Admin

func (p MySQLPassword) Admin() string

Admin returns the password for moco-admin.

func (MySQLPassword) Agent

func (p MySQLPassword) Agent() string

Agent returns the password for moco-agent.

func (MySQLPassword) Backup added in v0.8.1

func (p MySQLPassword) Backup() string

Backup returns the password for backup jobs.

func (MySQLPassword) Donor

func (p MySQLPassword) Donor() string

Donor returns the password for moco-clone-donor.

func (MySQLPassword) Exporter added in v0.8.1

func (p MySQLPassword) Exporter() string

Exporter returns the password for mysqld_exporter.

func (MySQLPassword) ReadOnly

func (p MySQLPassword) ReadOnly() string

ReadOnly returns the password for moco-readonly.

func (MySQLPassword) Replicator

func (p MySQLPassword) Replicator() string

Replicator returns the password for moco-repl.

func (MySQLPassword) ToMyCnfSecret

func (p MySQLPassword) ToMyCnfSecret() *corev1.Secret

ToMyCnfSecret converts MySQLPassword to Secret in my.cnf format. The caller have to fill Name and Namespace of the returned Secret.

func (MySQLPassword) ToSecret

func (p MySQLPassword) ToSecret() *corev1.Secret

ToSecret converts MySQLPassword to Secret. The caller have to fill Name and Namespace of the returned Secret.

func (MySQLPassword) Writable

func (p MySQLPassword) Writable() string

Writable returns the password for moco-writable.

Jump to

Keyboard shortcuts

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