mysqlctlclient

package
v3.0.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mysqlctlclient contains the generic client side of the remote mysqlctl protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(name string, factory Factory)

RegisterFactory allows a client implementation to register itself

Types

type Factory

type Factory func(network, addr string) (MysqlctlClient, error)

Factory functions are registered by client implementations.

type MysqlctlClient

type MysqlctlClient interface {
	// Start calls Mysqld.Start remotely.
	Start(ctx context.Context, mysqldArgs ...string) error

	// Shutdown calls Mysqld.Shutdown remotely.
	Shutdown(ctx context.Context, waitForMysqld bool) error

	// RunMysqlUpgrade calls Mysqld.RunMysqlUpgrade remotely.
	RunMysqlUpgrade(ctx context.Context) error

	// ReinitConfig calls Mysqld.ReinitConfig remotely.
	ReinitConfig(ctx context.Context) error

	// RefreshConfig calls Mysqld.RefreshConfig remotely.
	RefreshConfig(ctx context.Context) error

	// Close will terminate the connection. This object won't be used anymore.
	Close()
}

MysqlctlClient defines the interface used to send remote mysqlctl commands

func New

func New(network, addr string) (MysqlctlClient, error)

New creates a client implementation as specified by a flag.

Jump to

Keyboard shortcuts

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