Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// MysqlServerIDOffset represents the offset with which all server ids are shifted from 0
MysqlServerIDOffset = 100
)
Functions ¶
func RunCloneCommand ¶
RunCloneCommand clone the data from source.
func RunConfigCommand ¶
RunConfigCommand generates my.cnf, client.cnf and 10-dynamic.cnf files. nolint: gocyclo
func RunSidecarCommand ¶
RunSidecarCommand is the main command, and represents the runtime helper that configures the mysql server
func RunTakeBackupCommand ¶
RunTakeBackupCommand starts a backup command
Types ¶
type Config ¶
type Config struct { // Hostname represents the pod hostname Hostname string // ClusterName is the MySQL cluster name ClusterName string // Namespace represents the namespace where the pod is in Namespace string // ServiceName is the name of the headless service ServiceName string // InitBucketURL represents the init bucket to initialize mysql InitBucketURL string // OperatorUser represents the credentials that the operator will use to connect to the mysql OperatorUser string OperatorPassword string // backup user and password for http endpoint BackupUser string BackupPassword string // replication user and password ReplicationUser string ReplicationPassword string // metrics exporter user and password MetricsUser string MetricsPassword string // orchestrator credentials OrchestratorUser string OrchestratorPassword string // heartbeat credentials HeartBeatUser string HeartBeatPassword string // ExistsMySQLData checks if MySQL data is initialized by checking if the mysql dir exists ExistsMySQLData bool }
Config contains information related with the pod.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns a pointer to Config configured from environment variables
func (*Config) ClusterFQDN ¶
ClusterFQDN returns the cluster FQ Name of the cluster from which the node belongs
func (*Config) FQDNForServer ¶
FQDNForServer returns the pod hostname for given MySQL server id
func (*Config) MasterFQDN ¶
MasterFQDN the FQ Name of the cluster's master
func (*Config) ShouldCloneFromBucket ¶ added in v0.3.0
ShouldCloneFromBucket returns true if it's time to initialize from a bucket URL provided