Documentation
¶
Index ¶
- Constants
- Variables
- func BinlogServerPodName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
- func ConfigSecretName(cr *apiv1.PerconaServerMySQL) string
- func GetBinlogServerPod(ctx context.Context, cl client.Client, cr *apiv1.PerconaServerMySQL, ...) (*corev1.Pod, error)
- func MatchLabels(cr *apiv1.PerconaServerMySQL) map[string]string
- func Name(cr *apiv1.PerconaServerMySQL) string
- func RestoreConfigSecretName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
- func RestoreMatchLabels(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) map[string]string
- func RestoreName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
- func StatefulSet(cr *apiv1.PerconaServerMySQL, spec *apiv1.BinlogServerSpec, ...) *appsv1.StatefulSet
- type BinlogEntry
- type Configurable
- func (c *Configurable) ExecuteConfigurationTemplate(input string, memory *resource.Quantity) (string, error)
- func (c *Configurable) GetConfigMapKey() string
- func (c *Configurable) GetConfigMapName() string
- func (c *Configurable) GetConfiguration() string
- func (c *Configurable) GetResources() corev1.ResourceRequirements
- type Configuration
- type Connection
- type ConnectionSSL
- type ConnectionTLS
- type Logger
- type Replication
- type ReplicationMode
- type Rewrite
- type SearchResponse
- type Storage
Constants ¶
View Source
const ( AppName = "binlog-server" CredsMountPath = "/etc/mysql/mysql-users-secret" TLSMountPath = "/etc/mysql/mysql-tls-secret" BufferMountPath = "/var/lib/binlogsrv" ConfigKey = "config.json" )
Variables ¶
View Source
var ErrNoCredentials = errors.New("no binlog server credentials")
Functions ¶
func BinlogServerPodName ¶ added in v1.2.0
func BinlogServerPodName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
func ConfigSecretName ¶
func ConfigSecretName(cr *apiv1.PerconaServerMySQL) string
func GetBinlogServerPod ¶ added in v1.2.0
func MatchLabels ¶
func MatchLabels(cr *apiv1.PerconaServerMySQL) map[string]string
func Name ¶
func Name(cr *apiv1.PerconaServerMySQL) string
func RestoreConfigSecretName ¶ added in v1.2.0
func RestoreConfigSecretName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
func RestoreMatchLabels ¶ added in v1.2.0
func RestoreMatchLabels(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) map[string]string
func RestoreName ¶ added in v1.2.0
func RestoreName(cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore) string
func StatefulSet ¶
func StatefulSet(cr *apiv1.PerconaServerMySQL, spec *apiv1.BinlogServerSpec, labels map[string]string, initImage, configHash, configSecretName string) *appsv1.StatefulSet
Types ¶
type BinlogEntry ¶ added in v1.1.0
type Configurable ¶
type Configurable struct {
// contains filtered or unexported fields
}
func (*Configurable) ExecuteConfigurationTemplate ¶
func (*Configurable) GetConfigMapKey ¶
func (c *Configurable) GetConfigMapKey() string
func (*Configurable) GetConfigMapName ¶
func (c *Configurable) GetConfigMapName() string
func (*Configurable) GetConfiguration ¶
func (c *Configurable) GetConfiguration() string
func (*Configurable) GetResources ¶
func (c *Configurable) GetResources() corev1.ResourceRequirements
type Configuration ¶
type Configuration struct {
Logger Logger `json:"logger,omitempty"`
Connection Connection `json:"connection"`
Replication Replication `json:"replication,omitempty"`
Storage Storage `json:"storage,omitempty"`
}
func GetConfiguration ¶ added in v1.2.0
func GetConfiguration(ctx context.Context, cl client.Client, cr *apiv1.PerconaServerMySQL, spec *apiv1.BinlogServerSpec) (Configuration, error)
type Connection ¶
type Connection struct {
Host string `json:"host,omitempty"`
Port int32 `json:"port,omitempty"`
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
ConnectTimeout int32 `json:"connect_timeout,omitempty"`
ReadTimeout int32 `json:"read_timeout,omitempty"`
WriteTimeout int32 `json:"write_timeout,omitempty"`
SSL *ConnectionSSL `json:"ssl,omitempty"`
TLS *ConnectionTLS `json:"tls,omitempty"`
}
type ConnectionSSL ¶ added in v1.1.0
type ConnectionSSL struct {
Mode string `json:"mode,omitempty"`
CA string `json:"ca,omitempty"`
CAPath string `json:"capath,omitempty"`
CRL string `json:"crl,omitempty"`
CRLPath string `json:"crlpath,omitempty"`
Cert string `json:"cert,omitempty"`
Key string `json:"key,omitempty"`
Cipher string `json:"cipher,omitempty"`
}
type ConnectionTLS ¶ added in v1.1.0
type Replication ¶
type Replication struct {
ServerID int32 `json:"server_id,omitempty"`
IdleTime int32 `json:"idle_time,omitempty"`
VerifyChecksum bool `json:"verify_checksum,omitempty"`
Mode ReplicationMode `json:"mode,omitempty"`
Rewrite Rewrite `json:"rewrite,omitempty"`
}
type ReplicationMode ¶ added in v1.1.0
type ReplicationMode string
const (
ReplicationModeGTID ReplicationMode = "gtid"
)
type SearchResponse ¶ added in v1.1.0
type SearchResponse struct {
Version int `json:"version"`
Status string `json:"status"`
Result []BinlogEntry `json:"result"`
}
func SearchByGTID ¶ added in v1.1.0
func SearchByGTID(ctx context.Context, cl client.Client, cliCmd clientcmd.Client, cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore, gtidSet string) (*SearchResponse, error)
func SearchByTimestamp ¶ added in v1.1.0
func SearchByTimestamp(ctx context.Context, cl client.Client, cliCmd clientcmd.Client, cr *apiv1.PerconaServerMySQL, restore *apiv1.PerconaServerMySQLRestore, timestamp string) (*SearchResponse, error)
Click to show internal directories.
Click to hide internal directories.