binlogserver

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

This section is empty.

Functions

func ConfigSecretName

func ConfigSecretName(cr *apiv1.PerconaServerMySQL) string

func MatchLabels

func MatchLabels(cr *apiv1.PerconaServerMySQL) map[string]string

func Name

func StatefulSet

func StatefulSet(cr *apiv1.PerconaServerMySQL, initImage, configHash string) *appsv1.StatefulSet

Types

type BinlogEntry added in v1.1.0

type BinlogEntry struct {
	Name          string `json:"name"`
	Size          int64  `json:"size"`
	URI           string `json:"uri"`
	PreviousGTIDs string `json:"previous_gtids"`
	AddedGTIDs    string `json:"added_gtids"`
	MinTimestamp  string `json:"min_timestamp"`
	MaxTimestamp  string `json:"max_timestamp"`
}

type Configurable

type Configurable apiv1.PerconaServerMySQL

func (*Configurable) ExecuteConfigurationTemplate

func (c *Configurable) ExecuteConfigurationTemplate(input string, memory *resource.Quantity) (string, error)

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"`
}

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 ConnectionTLS struct {
	CipherSuites string `json:"ciphersuites,omitempty"`
	Version      string `json:"version,omitempty"`
}

type Logger

type Logger struct {
	Level string `json:"level,omitempty"`
	File  string `json:"file,omitempty"`
}

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 Rewrite added in v1.1.0

type Rewrite struct {
	BaseFileName string `json:"base_file_name,omitempty"`
	FileSize     string `json:"file_size,omitempty"`
}

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, 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, timestamp string) (*SearchResponse, error)

type Storage

type Storage struct {
	Backend            string `json:"backend,omitempty"`
	URI                string `json:"uri,omitempty"`
	FsBufferDirectory  string `json:"fs_buffer_directory,omitempty"`
	CheckpointSize     string `json:"checkpoint_size,omitempty"`
	CheckpointInterval string `json:"checkpoint_interval,omitempty"`
}

Jump to

Keyboard shortcuts

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