Documentation
¶
Overview ¶
Package logical provides jobs for logical initial operations.
Package logical provides jobs for logical initial operations.
Index ¶
Constants ¶
const (
// DumpJobType declares a job type for logical dumping.
DumpJobType = "logicalDump"
)
const (
// RestoreJobType declares a job type for logical dumping.
RestoreJobType = "logicalRestore"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
DBName string `yaml:"dbname"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}
Connection provides connection options.
type DumpDefinition ¶
type DumpDefinition struct {
Tables []string `yaml:"tables"`
Format string `yaml:"format"`
Compression compressionType `yaml:"compression"`
// contains filtered or unexported fields
}
DumpDefinition describes a database for dumping.
type DumpJob ¶
type DumpJob struct {
DumpOptions
// contains filtered or unexported fields
}
DumpJob declares a job for logical dumping.
func NewDumpJob ¶
func NewDumpJob(jobCfg config.JobConfig, global *global.Config, engineProps global.EngineProps) (*DumpJob, error)
NewDumpJob creates a new DumpJob.
type DumpOptions ¶
type DumpOptions struct {
DumpLocation string `yaml:"dumpLocation"`
DockerImage string `yaml:"dockerImage"`
ContainerConfig map[string]interface{} `yaml:"containerConfig"`
Connection Connection `yaml:"connection"`
Source Source `yaml:"source"`
Databases map[string]DumpDefinition `yaml:"databases"`
ParallelJobs int `yaml:"parallelJobs"`
Restore ImmediateRestore `yaml:"immediateRestore"`
}
DumpOptions defines a logical dump options.
type ImmediateRestore ¶
type ImmediateRestore struct {
Enabled bool `yaml:"enabled"`
ForceInit bool `yaml:"forceInit"`
Configs map[string]string `yaml:"configs"`
}
ImmediateRestore contains options for direct data restore without saving the dump file on disk.
type Partial ¶
type Partial struct {
Tables []string `yaml:"tables"`
}
Partial defines tables and rules for a partial logical restore.
type RDSConfig ¶
type RDSConfig struct {
AWSRegion string `yaml:"awsRegion"`
DBInstance string `yaml:"dbInstanceIdentifier"`
SSLRootCert string `yaml:"sslRootCert"`
}
RDSConfig describes configuration of an RDS instance.
type RestoreJob ¶
type RestoreJob struct {
RestoreOptions
// contains filtered or unexported fields
}
RestoreJob defines a logical restore job.
func NewJob ¶
func NewJob(cfg config.JobConfig, global *global.Config, engineProps global.EngineProps) (*RestoreJob, error)
NewJob create a new logical restore job.
func (*RestoreJob) Reload ¶
func (r *RestoreJob) Reload(cfg map[string]interface{}) (err error)
Reload reloads job configuration.
type RestoreOptions ¶
type RestoreOptions struct {
DumpLocation string `yaml:"dumpLocation"`
DockerImage string `yaml:"dockerImage"`
ContainerConfig map[string]interface{} `yaml:"containerConfig"`
Databases map[string]DumpDefinition `yaml:"databases"`
ForceInit bool `yaml:"forceInit"`
ParallelJobs int `yaml:"parallelJobs"`
Configs map[string]string `yaml:"configs"`
}
RestoreOptions defines a logical restore options.
type Source ¶
type Source struct {
Type string `yaml:"type"`
Connection Connection `yaml:"connection"`
RDS *RDSConfig `yaml:"rdsIam"`
}
Source describes source of data to dump.