engine

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(rdr reader.Reader, dumper Dumper) dumper.Dumper

New creates a new engine given the reader and dumper.

Types

type Dumper

type Dumper interface {
	// DumpStructure dumps database structure given a sql.
	DumpStructure(sql string) error
	// DumpTable dumps a table by name.
	DumpTable(tableName string, rowChan <-chan database.Row) error
	// Close closes the dumper resources and releases them.
	Close() error
}

Dumper is the dump engine.

type Engine

type Engine struct {
	Dumper
	// contains filtered or unexported fields
}

Engine is the engine which dispatches and orchestrates a dump.

func (*Engine) Dump

func (e *Engine) Dump(done chan<- struct{}, cfgTables config.Tables, concurrency int, dataOnly bool) error

Dump executes the dump process.

type Hooker

type Hooker interface {
	// PreDumpTables performs a action before dumping tables before dumping tables.
	PreDumpTables([]string) error
	// PostDumpTables performs a action after dumping tables before dumping tables.
	PostDumpTables([]string) error
}

Hooker are the actions you perform before or after a specified database operation.

Jump to

Keyboard shortcuts

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