Documentation
¶
Overview ¶
Package mysql implements the ditto Engine interface for MySQL and MariaDB. It registers itself via init() so that a blank import in main.go is sufficient to make the engine available.
Index ¶
- type Engine
- func (e *Engine) ConnectionString(conn engine.ConnectionConfig) string
- func (e *Engine) ContainerImage() string
- func (e *Engine) ContainerPort() int
- func (e *Engine) ContainerSpec(copy engine.CopyBootstrap) engine.ContainerSpec
- func (e *Engine) Dump(ctx context.Context, req engine.DumpRequest) error
- func (e *Engine) DumpFromContainer(ctx context.Context, req engine.DumpFromContainerRequest) error
- func (e *Engine) Name() string
- func (e *Engine) Restore(ctx context.Context, req engine.RestoreRequest) error
- func (e *Engine) WaitReady(conn engine.ConnectionConfig, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine implements engine.Engine for MySQL / MariaDB.
func (*Engine) ConnectionString ¶
func (e *Engine) ConnectionString(conn engine.ConnectionConfig) string
func (*Engine) ContainerImage ¶
func (*Engine) ContainerPort ¶ added in v0.2.0
func (*Engine) ContainerSpec ¶ added in v0.2.0
func (e *Engine) ContainerSpec(copy engine.CopyBootstrap) engine.ContainerSpec
func (*Engine) Dump ¶
Dump runs mysqldump inside a short-lived helper container, then compresses the resulting SQL dump to destPath. When opts.SchemaOnly is true, --no-data is passed so only DDL is captured.
func (*Engine) DumpFromContainer ¶
DumpFromContainer creates a gzip-compressed mysqldump of the ditto database running inside containerName and writes it to destPath on the host. The container must have its dump directory mounted at /dump (read-write). When opts.SchemaOnly is true, --no-data is passed to mysqldump.