mysql

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultImage = "mysql:5.7"
)

Functions

This section is empty.

Types

type MysqlConfig

type MysqlConfig struct {

	// Password is the mysql password for the standard user "root"
	Password string

	// DbName is the name of the database you want to create and connect to
	DbName string

	// ProbeTimeout specifies the timeout for the probing.
	// A timeout results in a startup error, if left empty a default value is used
	ProbeTimeout time.Duration

	// Image specifies the image used for the Mysql docker instance.
	// If left empty it will be set to DefaultImage
	Image string

	// Platform if you want to specify it. Can be nil.
	Platform *v1.Platform
}

MysqlConfig contains configs for mysql, User is automatically root

type MysqlInstance

type MysqlInstance struct {
	*dockerinitiator.Instance

	MysqlConfig
	// contains filtered or unexported fields
}

MysqlInstance contains the config for mysql instance

func Mysql

func Mysql(config MysqlConfig) (*MysqlInstance, error)

Mysql starts up a mysql instance

func (*MysqlInstance) GetProject

func (mi *MysqlInstance) GetProject() string

GetProject fetches the project for the mysql instance

func (*MysqlInstance) Setenv

func (mi *MysqlInstance) Setenv() error

Setenv sets the required variables for running against the emulator

type MysqlProbe

type MysqlProbe struct {
	MysqlConfig
}

MysqlProbe implements the IProbe interface for mysql instances

func (MysqlProbe) DoProbe

func (i MysqlProbe) DoProbe(instance *dockerinitiator.Instance) error

DoProbe will probe by waiting for log messages

Jump to

Keyboard shortcuts

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