executor

package
v0.0.0-...-c2ba8ab Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 6 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 *v1.Executor, 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