mysql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance is MySQL instance installed by bytebase for testing.

func Install

func Install(basedir, datadir, user string) (*Instance, error)

Install installs mysql on basedir, prepares the data directory and default user.

func (Instance) Port

func (i Instance) Port() int

Port returns the port of the mysql instance.

func (*Instance) Start

func (i *Instance) Start(port int, stdout, stderr io.Writer, waitSec int) (err error)

Start starts the mysql instance on the given port, outputs to stdout and stderr. Waits at most `waitSec` seconds for the mysql instance to ready for connection. If `waitSec` is 0, it returns immediately.

func (*Instance) Stop

func (i *Instance) Stop(stdout, stderr io.Writer) error

Stop stops the mysql instance, outputs to stdout and stderr.

Jump to

Keyboard shortcuts

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