Documentation
¶
Index ¶
- func ConnectionFlags(co *CommandOpts, mariadb interfaces.Connector, ...) (string, error)
- type BackupCommand
- func (b *BackupCommand) MariadbBackup(mariadb *mariadbv1alpha1.MariaDB, backupFilePath string, targetPodIndex int) (*Command, error)
- func (b *BackupCommand) MariadbBackupRestore(mariadb *mariadbv1alpha1.MariaDB, backupDirPath string, ...) (*Command, error)
- func (b *BackupCommand) MariadbDump(backup *mariadbv1alpha1.Backup, mariadb interfaces.MariaDBObject) (*Command, error)
- func (b *BackupCommand) MariadbOperatorBackup(backupContentType mariadbv1alpha1.BackupContentType) *Command
- func (b *BackupCommand) MariadbOperatorRestore(backupContentType mariadbv1alpha1.BackupContentType, backupDirPath *string) *Command
- func (b *BackupCommand) MariadbRestore(restore *mariadbv1alpha1.Restore, mariadb interfaces.MariaDBObject) (*Command, error)
- type BackupOpt
- func WithBackup(path string, targetFilePath string) BackupOpt
- func WithBackupCompression(c mariadbv1alpha1.CompressAlgorithm) BackupOpt
- func WithBackupDatabase(d string) BackupOpt
- func WithBackupLogLevel(l string) BackupOpt
- func WithBackupMaxRetention(d time.Duration) BackupOpt
- func WithBackupPasswordEnv(p string) BackupOpt
- func WithBackupTargetTime(t time.Time) BackupOpt
- func WithBackupUserEnv(u string) BackupOpt
- func WithCleanupTargetFile(shouldCleanup bool) BackupOpt
- func WithExtraOpts(opts []string) BackupOpt
- func WithOmitCredentials(omit bool) BackupOpt
- func WithS3(bucket, endpoint, region, prefix string) BackupOpt
- func WithS3CACertPath(caCertPath string) BackupOpt
- func WithS3TLS(tls bool) BackupOpt
- type BackupOpts
- type Command
- type CommandOpts
- type ConnectionFlagOpt
- type ConnectionFlagsOpts
- type MariaDBBackupRestoreOpt
- type MariaDBBackupRestoreOpts
- type SqlCommand
- type SqlOpt
- type SqlOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectionFlags ¶
func ConnectionFlags(co *CommandOpts, mariadb interfaces.Connector, connectionFlagOpts ...ConnectionFlagOpt) (string, error)
Types ¶
type BackupCommand ¶
type BackupCommand struct {
BackupOpts
}
func NewBackupCommand ¶
func NewBackupCommand(userOpts ...BackupOpt) (*BackupCommand, error)
func (*BackupCommand) MariadbBackup ¶
func (b *BackupCommand) MariadbBackup(mariadb *mariadbv1alpha1.MariaDB, backupFilePath string, targetPodIndex int) (*Command, error)
func (*BackupCommand) MariadbBackupRestore ¶
func (b *BackupCommand) MariadbBackupRestore(mariadb *mariadbv1alpha1.MariaDB, backupDirPath string, restoreOpts ...MariaDBBackupRestoreOpt) (*Command, error)
func (*BackupCommand) MariadbDump ¶
func (b *BackupCommand) MariadbDump(backup *mariadbv1alpha1.Backup, mariadb interfaces.MariaDBObject) (*Command, error)
func (*BackupCommand) MariadbOperatorBackup ¶
func (b *BackupCommand) MariadbOperatorBackup(backupContentType mariadbv1alpha1.BackupContentType) *Command
func (*BackupCommand) MariadbOperatorRestore ¶
func (b *BackupCommand) MariadbOperatorRestore(backupContentType mariadbv1alpha1.BackupContentType, backupDirPath *string) *Command
func (*BackupCommand) MariadbRestore ¶
func (b *BackupCommand) MariadbRestore(restore *mariadbv1alpha1.Restore, mariadb interfaces.MariaDBObject) (*Command, error)
type BackupOpt ¶
type BackupOpt func(*BackupOpts)
func WithBackup ¶
func WithBackupCompression ¶
func WithBackupCompression(c mariadbv1alpha1.CompressAlgorithm) BackupOpt
func WithBackupDatabase ¶
func WithBackupLogLevel ¶
func WithBackupMaxRetention ¶
func WithBackupPasswordEnv ¶
func WithBackupTargetTime ¶
func WithBackupUserEnv ¶
func WithCleanupTargetFile ¶
func WithExtraOpts ¶
func WithOmitCredentials ¶
func WithS3CACertPath ¶
type BackupOpts ¶
type BackupOpts struct {
CommandOpts
Path string
TargetFilePath string
OmitCredentials bool
CleanupTargetFile bool
MaxRetentionDuration time.Duration
TargetTime time.Time
Compression mariadbv1alpha1.CompressAlgorithm
S3 bool
S3Bucket string
S3Endpoint string
S3Region string
S3TLS bool
S3CACertPath string
S3Prefix string
LogLevel string
ExtraOpts []string
}
type CommandOpts ¶
type ConnectionFlagOpt ¶ added in v25.8.3
type ConnectionFlagOpt func(*ConnectionFlagsOpts)
func WithHostConnectionFlag ¶ added in v25.8.3
func WithHostConnectionFlag(host string) ConnectionFlagOpt
type ConnectionFlagsOpts ¶ added in v25.8.3
type ConnectionFlagsOpts struct {
Host string
}
type MariaDBBackupRestoreOpt ¶ added in v25.10.0
type MariaDBBackupRestoreOpt func(*MariaDBBackupRestoreOpts)
func WithCleanupDataDir ¶ added in v25.10.0
func WithCleanupDataDir(cleanup bool) MariaDBBackupRestoreOpt
type MariaDBBackupRestoreOpts ¶ added in v25.10.0
type MariaDBBackupRestoreOpts struct {
// contains filtered or unexported fields
}
type SqlCommand ¶
type SqlCommand struct {
*SqlOpts
}
func NewSqlCommand ¶
func NewSqlCommand(userOpts ...SqlOpt) (*SqlCommand, error)
func (*SqlCommand) ExecCommand ¶
func (s *SqlCommand) ExecCommand(mariadb interfaces.Connector) (*Command, error)
func (*SqlCommand) SqlFlags ¶
func (s *SqlCommand) SqlFlags(mdb interfaces.Connector) (string, error)
type SqlOpt ¶
type SqlOpt func(*SqlOpts)
func WithSqlDatabase ¶
func WithSqlFile ¶
func WithSqlPasswordEnv ¶
func WithSqlUserEnv ¶
Click to show internal directories.
Click to hide internal directories.