executor

package
v0.0.0-...-146a38b Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MySQLDumpProvider denotes the mysqldump utility backup and restore provider.
	MySQLDumpProvider = "mysqldump"
)

Variables

View Source
var ExecutorProviders = [...]string{MySQLDumpProvider}

ExecutorProviders denotes the list of available ExecutorProviders.

Functions

func DefaultCreds

func DefaultCreds() map[string]string

DefaultCreds return the default MySQL credentials for the local instance.

Types

type Interface

type Interface interface {
	// Backup runs a backup operation using the given credentials, returning the content.
	// TODO: default backupDir to allow streaming...
	Backup(backupDir string, clusterName string) (io.ReadCloser, string, error)
	// Restore restores the given content to the mysql node.
	Restore(content io.ReadCloser) error
}

Interface will execute backup operations via a tool such as mysqlbackup or mysqldump.

func New

func New(executor v1alpha1.BackupExecutor, creds map[string]string) (Interface, error)

New builds a new backup executor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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